-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmrp_servicemc_view.xml
More file actions
314 lines (300 loc) · 19.6 KB
/
mrp_servicemc_view.xml
File metadata and controls
314 lines (300 loc) · 19.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_servicemc_order_tree" model="ir.ui.view">
<field name="name">mrp.servicemc.tree</field>
<field name="model">mrp.servicemc</field>
<field name="arch" type="xml">
<tree string="Orden de Servicio" colors="gray:state in ('done','cancel');black:state not in ('done','cancel');blue:state=='draft'">
<field name="name" />
<field name="product_id" />
<field name="move_id"/>
<field name="partner_id"/>
<field name="address_id"/>
<field name="location_id" groups="stock.group_locations"/>
<field name="location_dest_id" groups="stock.group_locations"/>
<field name="company_id" groups="base.group_multi_company" invisible="1"/>
<field name="guarantee_limit"/>
<field name="state"/>
</tree>
</field>
</record>
<record id="view_servicemc_order_form" model="ir.ui.view">
<field name="name">mrp.servicemc.form</field>
<field name="model">mrp.servicemc</field>
<field name="arch" type="xml">
<form string="Orden de Servicio" version="7.0">
<header>
<button name="servicemc_confirm" states="draft" string="Confirm servicemc" class="oe_highlight"/>
<button name="servicemc_ready" states="confirmed,ready" string="Start servicemc" class="oe_highlight"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
<button name="action_servicemc_end" states="under_servicemc" string="End servicemc" class="oe_highlight"/>
<button name="action_invoice_create" states="2binvoiced" string="Create Invoice" class="oe_highlight"/>
<button name="invoice_recreate" states="invoice_except" string="Recreate Invoice"/>
<button name="invoice_corrected" states="invoice_except" string="Invoice Corrected"/>
<button name="action_cancel" string="Cancel servicemc" type="object" attrs="{'invisible':['|',('invoice_method','!=','none'), ('state', 'not in',('confirmed','2binvoiced','ready','under_servicemc', 'invoice_except'))]}"/>
<button name="cancel" states="draft" string="Cancel servicemc"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirmed,done"/>
</header>
<sheet string="Orden de Servicio">
<h1>
Orden de Servicio <field name="name" class="oe_inline"/>
</h1>
<group>
<group>
<field name="product_id" on_change="onchange_product_id(product_id)" domain="[('type','!=','service')]"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id,address_id)" attrs="{'required':[('invoice_method','!=','none')]}"/>
<field name="address_id" groups="sale.group_delivery_invoice_address"/>
<field name="move_id" on_change="onchange_move_id(product_id, move_id)" context="{'default_product_id':product_id}"/>
<field name="location_id" attrs="{'required':[('deliver_bool','=', True)]}" groups="stock.group_locations"/>
<field name="prodlot_id" on_change="onchange_lot_id(prodlot_id,product_id)" groups="stock.group_production_lot" string="Serial Number"/>
<field name="modelo_id" />
</group>
<group>
<field name="guarantee_limit"/>
<field name="fecha_alta"/>
<field name="deliver_bool"/>
<field name="servicemced" groups="base.group_no_one"/>
<field name="invoiced" groups="base.group_no_one"/>
</group>
</group>
<notebook>
<!--empieza el notebook propio -->
<page string="Jefe de Area Cliente">
<form string="Jefe de Area Cliente" version="7.0">
<h2>Contacto Cliente</h2>
<group col="4">
<field name="clienteNombre" />
</group>
<h2>Contacto Empresa</h2>
<group col="4">
<field name="empresaNombre" />
</group>
</form>
</page>
<!--finaliza la primera parte del notebook propio -->
<page string="Inspeccion">
<field name="operations">
<form string="Operations" version="7.0">
<notebook>
<page string="servicemc Line">
<group col="4">
<field name="name"/>
<field name="product_id" on_change="product_id_change(parenproduct_id,product_uom,product_uom_qty, parent.partner_id)"/>
<label for="product_uom_qty"/>
<div>
<field name="product_uom_qty" class="oe_inline"/>
<field name="product_uom" class="oe_inline" groups="product.group_uom"/>
</div>
<field name="price_unit"/>
<field name="price_subtotal"/>
<field name="type" on_change="onchange_operation_type(type,parent.guarantee_limit,parent.company_id,context)"/>
<field name="to_invoice"/>
<field name="tax_id" widget="many2many_tags" domain="[('parent_id','=',False),('type_tax_use','<>','purchase')]"/>
<field name="invoiced"/>
<field name='prodlot_id' groups="stock.group_production_lot" string="Serial Number"/>
<field name="location_id" groups="stock.group_locations"/>
<field name="location_dest_id" groups="stock.group_locations"/>
</group>
</page>
<page string="History">
<group>
<field name="move_id" />
<field name="invoice_line_id"/>
</group>
</page>
</notebook>
</form>
<tree string="Operations" editable="bottom">
<field name="type" on_change="onchange_operation_type(type,parent.guarantee_limit,parent.company_id,context)"/>
<field name="product_id" on_change="product_id_change(parent.pricelist_id,product_id,product_uom,product_uom_qty, parent.partner_id)"/>
<field name='name'/>
<field name="prodlot_id" groups="stock.group_production_lot" string="Serial Number"/>
<field name="location_id" groups="stock.group_locations"/>
<field name="location_dest_id" groups="stock.group_locations"/>
<field name="product_uom_qty" string="Quantity"/>
<field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
<field name="price_unit"/>
<field name="tax_id" widget="many2many_tags"/>
<field name="to_invoice"/>
<field name="price_subtotal"/>
</tree>
</field>
<group class="oe_subtotal_footer oe_right">
<field name="amount_untaxed" sum="Untaxed amount"/>
<field name="amount_tax"/>
<div class="oe_subtotal_footer_separator oe_inline">
<label for="amount_total" />
<button name="button_dummy"
states="draft" string="(update)" type="object" class="oe_edit_only oe_link"/>
</div>
<field name="amount_total" nolabel="1" sum="Total amount" class="oe_subtotal_footer_separator"/>
</group>
<div class="oe_clear"/>
</page>
<page string="Invoicing">
<group col="4">
<field name="invoice_method"/>
<field name="partner_invoice_id" attrs="{'readonly':[('invoice_method','=', 'none')],'required':[('invoice_method','!=','none')]}" groups="sale.group_delivery_invoice_address"/>
<field
name="pricelist_id" groups="product.group_sale_pricelist" context="{'product_id':product_id}"
attrs="{'readonly':[('invoice_method','=', 'none')]}"/>
</group>
<!-- <field name="invoice_id"/> -->
<field name="fees_lines">
<form string="Fees" version="7.0">
<label for="name" class="oe_edit_only"/>
<h2>
<field name="name"/>
</h2>
<group string="Product Information">
<group>
<field name="to_invoice"/>
<field name="product_id" on_change="product_id_change(parent.pricelist_id,product_id,product_uom,product_uom_qty, parent.partner_id,parent.guarantee_limit)"/>
<label for="product_uom_qty"/>
<div>
<field name="product_uom_qty" string="Quantity" class="oe_inline"/>
<field name="product_uom" groups="product.group_uom" class="oe_inline"/>
</div>
</group>
<group>
<field name="price_unit"/>
<field widget="many2many_tags" name="tax_id" domain="[('parent_id','=',False),('type_tax_use','<>','purchase')]"/>
<field name="price_subtotal"/>
</group>
</group>
<group string="History">
<group>
<field name="invoiced"/>
</group>
<group>
<field name="invoice_line_id" />
</group>
</group>
</form>
<tree string="Fees" editable="bottom">
<field name="product_id" on_change="product_id_change(parent.pricelist_id,product_id,product_uom,product_uom_qty, parent.partner_id,parent.guarantee_limit)"/>
<field name='name'/>
<field name="product_uom_qty" string="Quantity"/>
<field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
<field name="price_unit"/>
<field name="tax_id" domain="[('parent_id', '=', False), ('type_tax_use', '=', 'purchase')]" widget="many2many_tags"/>
<field name="to_invoice"/>
<field name="price_subtotal"/>
</tree>
</field>
</page>
<page string="Orden de Producion">
<!--==========================VISTA LIBRO DENTRO PRINCIPAL=========================-->
<notebook>
<page string="Realizaron Actividades">
<form string="Responsable" version="7.0">
<group col="4">
<!--<field name="produccion_fecha_inicial" />-->
<field name="produccion_fecha_final" />
<field name="produccion_re_ter_unidad" />
</group>
<group>
<field name="produccion_notas" />
</group>
</form>
</page>
<page string="Personal que Realizo la Inspeccion">
<form string="resposable calidad" version="7.0">
<group col="4">
<field name="calidad_fecha_inicial"/>
<field name="calidad_fecha_final"/>
<field name="calidad_pri_inpeccion"/>
<field name="calidad_re_li_unidad"/>
<field name="calidad_fecha_liberacion"/>
<field name="calidad_liberada"/>
</group>
<group>
<field name="calidad_notas"/>
</group>
</form>
</page>
</notebook>
<!--======================FIN VISTA LIBRO DENTRO PRINCIPAL=====================-->
</page>
<page string="Entrega">
<form string="Contacto Empresa" version="7.0">
<h2>Entrega Cliente</h2>
<group col="4">
<field name="clienteEntregaNombre" />
</group>
<h2>Recibe Personal de la Empresa</h2>
<group col="4">
<field name="empresaEntregaNombre" />
</group>
</form>
</page>
<page string="Extra Info">
<group>
<group>
<field name="picking_id"/>
<field name="invoice_id" context="{'form_view_ref': 'account.invoice_form'}"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<group>
<field name="location_dest_id" attrs="{'required':[('deliver_bool','=', True)]}" groups="stock.group_locations"/>
</group>
</group>
</page>
<page string="Notes">
<field name="internal_notes" placeholder="Add internal notes..."/>
<field name="quotation_notes" placeholder="Add quotation notes..."/>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</record>
<record id="view_servicemc_order_form_filter" model="ir.ui.view">
<field name="name">mrp.servicemc.select</field>
<field name="model">mrp.servicemc</field>
<field name="arch" type="xml">
<search string="Search Reair Orders">
<field name="name" string="Ordenes de Servicio"/>
<field name="state"/>
<filter icon="terp-document-new" string="Quotations" domain="[('state','=','draft')]"/>
<filter icon="terp-check" string="Confirmed" domain="[('state','=','confirmed')]" name="current" />
<filter icon="terp-emblem-important" string="Ready To servicemc" domain="[('state','=','ready')]"/>
<separator/>
<filter icon="terp-dolar" string="Invoiced" domain="[('invoiced','=',True)]"/>
<field name="product_id"/>
<field name="partner_id" filter_domain="[('partner_id', 'child_of', self)]"/>
<group expand="0" string="Group By...">
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'guarantee_limit'}" help="Guarantee limit"/>
<filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
</group>
</search>
</field>
</record>
<record id="action_servicemc_order_tree" model="ir.actions.act_window">
<field name="name">Ordenes de Servicio</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">mrp.servicemc</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_servicemc_order_form_filter"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">Click to create a reparation order.</p>
<p>
In a servicemc order, you can detail the components you remove, add or replace and record the time you spent on the different operations.
</p>
<p>
The servicemc order uses the warranty date on the Serial Number in order to know if whether the servicemc should be invoiced to the customer or not.
</p>
</field>
</record>
<menuitem action="action_servicemc_order_tree" id="menu_servicemc_order" parent="mrp.menu_mrp_manufacturing" groups="mrp.group_mrp_user" name="Ordenes de Servicio" sequence="50"/>
</data>
</openerp>