1 <?xml version="1.0" encoding="utf-8"?>
5 <record id="view_repair_order_form" model="ir.ui.view">
6 <field name="name">mrp.repair.form</field>
7 <field name="model">mrp.repair</field>
8 <field name="type">form</field>
9 <field name="arch" type="xml">
10 <form string="Repairs order">
11 <group col="6" colspan="4">
13 <field name="product_id" select="1" on_change="onchange_product_id(product_id)"/>
14 <field name="deliver_bool"/>
16 <field name="prodlot_id" select="2" on_change="onchange_lot_id(prodlot_id,product_id)"/>
17 <field name="move_id" on_change="onchange_move_id(product_id, move_id)"/>
18 <field name="repaired"/>
20 <field name="partner_id" select="2" on_change="onchange_partner_id(partner_id,address_id)"/>
21 <field name="address_id" attrs="{'readonly':[('deliver_bool','=', False)]}"/>
22 <field name="invoiced"/>
24 <notebook colspan="4">
25 <page string="Operations">
26 <field name="guarantee_limit" />
28 <field colspan="4" mode="tree,form" name="operations" nolabel="1" widget="one2many_list">
29 <form string="Operations">
31 <page string="Repair Line">
32 <field name="name" colspan="4"/>
33 <field name="product_id" on_change="product_id_change(parent.pricelist_id,product_id,product_uom,product_uom_qty, parent.partner_id)" colspan="4"/>
34 <field name="product_uom_qty" string="Qty" />
35 <field name="product_uom" string="UoM"/>
36 <field name="price_unit"/>
37 <field name="price_subtotal"/>
38 <field name="location_id"/>
39 <field name="location_dest_id"/>
41 <field name="type" on_change="onchange_operation_type(type,parent.guarantee_limit)"/>
43 <field name="to_invoice"/>
44 <field name="invoiced"/>
47 <field colspan="4" name="tax_id" domain="[('parent_id','=',False),('type_tax_use','<>','purchase')]"/>
48 <separator colspan="4" string="States"/>
51 <page string="History" groups="base.group_extended">
52 <field colspan="4" name="move_id" />
53 <field colspan="4" name="invoice_line_id"/>
58 <tree string="Operations" editable="bottom">
59 <field name="type" on_change="onchange_operation_type(type,parent.guarantee_limit)"/>
60 <field name="product_id" on_change="product_id_change(parent.pricelist_id,product_id,product_uom,product_uom_qty, parent.partner_id)"/>
62 <field name="location_id"/>
63 <field name="location_dest_id"/>
64 <field name="product_uom_qty" string="Qty"/>
65 <field name="product_uom" string="UoM"/>
66 <field name="price_unit"/>
67 <field name="tax_id"/>
68 <field name="to_invoice"/>
69 <field name="price_subtotal"/>
73 <group col="7" colspan="4">
74 <field name="amount_untaxed" sum="Untaxed amount"/>
75 <field name="amount_tax"/>
76 <field name="amount_total" sum="Total amount"/>
77 <button name="button_dummy" states="draft" string="Compute" type="object"/>
80 <group col="13" colspan="4">
81 <field name="state" select="2"/>
82 <button name="repair_confirm" states="draft" string="Confirm Repair"/>
83 <button name="repair_ready" states="confirmed" string="Start Repair"/>
84 <button name="action_repair_start" states="ready" string="Start Repair"/>
85 <button name="action_repair_end" states="under_repair" string="End Repair"/>
86 <button name="invoice_recreate" states="invoice_except" string="Recreate Invoice"/>
87 <button name="invoice_corrected" states="invoice_except" string="Invoice Corrected"/>
88 <button name="action_invoice_create" states="2binvoiced" string="Make Invoice"/>
89 <button name="%(action_cancel_repair)d" states="invoice_except" string="Cancel Repair" type="action"/>
90 <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
91 <button name="cancel" states="draft" string="Cancel Repair"/>
92 <button name="%(action_cancel_repair)d" states="confirmed,2binvoiced,ready,under_repair" string="Cancel Repair" type="action"/>
95 <page string="Invoicing">
96 <field name="invoice_method" colspan="4" />
97 <field name="pricelist_id" context="product_id=product_id" attrs="{'readonly':[('invoice_method','=', 'none')]}"/>
98 <field name="partner_invoice_id" attrs="{'readonly':[('invoice_method','=', 'none')]}"/>
99 <!--<field name="invoice_id"/>-->
100 <field colspan="4" mode="tree,form" name="fees_lines" nolabel="1" widget="one2many_list">
103 <page string="Fees Line">
105 <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)" colspan="4"/>
106 <field name="product_uom_qty" string="Qty"/>
107 <field name="product_uom" string="UoM" />
108 <field name="price_unit"/>
109 <field name="price_subtotal"/>
112 <field name="to_invoice"/>
113 <field name="invoiced"/>
116 <field colspan="4" name="tax_id" domain="[('parent_id','=',False),('type_tax_use','>>','purchase')]"/>
118 <page string="History" groups="base.group_extended">
119 <field colspan="4" name="invoice_line_id" />
123 <tree string="Fees" editable="bottom">
124 <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)"/>
126 <field name="product_uom_qty" string="Qty"/>
127 <field name="product_uom" string="UoM"/>
128 <field name="price_unit"/>
129 <field name="to_invoice"/>
130 <field name="price_subtotal"/>
134 <page string="Quality">
135 <separator colspan="4" string="Internal Notes"/>
136 <field colspan="4" name="internal_notes" nolabel="1"/>
137 <separator colspan="4" string="Quotation Notes"/>
138 <field colspan="4" name="quotation_notes" nolabel="1"/>
140 <page string="Extra Info" groups="base.group_extended">
141 <field name="invoice_id"/>
142 <field name="picking_id"/>
143 <field name="location_id"/>
144 <field name="location_dest_id" attrs="{'readonly':[('deliver_bool','=', False)], 'required':[('deliver_bool','=', True)]}"/>
151 <record id="view_repair_order_tree" model="ir.ui.view">
152 <field name="name">mrp.repair.tree</field>
153 <field name="model">mrp.repair</field>
154 <field name="type">tree</field>
155 <field name="arch" type="xml">
156 <tree string="Repairs order">
157 <field name="name" select="1" />
158 <field name="product_id" select="1" />
159 <field name="prodlot_id" select="2"/>
160 <field name="partner_id" select="2"/>
161 <field name="address_id"/>
162 <field name="location_id"/>
163 <field name="state" select="2"/>
164 <field name="move_id"/>
165 <field name="location_dest_id"/>
166 <field name="guarantee_limit"/>
171 <record id="action_repair_order_form" model="ir.actions.act_window">
172 <field name="name">New Repair</field>
173 <field name="type">ir.actions.act_window</field>
174 <field name="res_model">mrp.repair</field>
175 <field name="view_type">form</field>
176 <field name="view_mode">form,tree</field>
179 <record id="action_repair_order_tree" model="ir.actions.act_window">
180 <field name="name">Repair Orders</field>
181 <field name="type">ir.actions.act_window</field>
182 <field name="res_model">mrp.repair</field>
183 <field name="view_type">form</field>
184 <field name="view_mode">tree,form</field>
187 <record id="action_repair_quotation_tree" model="ir.actions.act_window">
188 <field name="name">Repairs in quotation</field>
189 <field name="type">ir.actions.act_window</field>
190 <field name="res_model">mrp.repair</field>
191 <field name="view_type">form</field>
192 <field name="view_mode">tree,form</field>
193 <field name="domain">[('state','=','draft')]</field>
194 <field name="filter" eval="True"/>
197 <record id="action_repair_progress_tree" model="ir.actions.act_window">
198 <field name="name">Repairs in progress</field>
199 <field name="type">ir.actions.act_window</field>
200 <field name="res_model">mrp.repair</field>
201 <field name="view_type">form</field>
202 <field name="view_mode">tree,form</field>
203 <field name="domain">[('state','=','under_repair')]</field>
204 <field name="filter" eval="True"/>
207 <record id="action_repair_ready_tree" model="ir.actions.act_window">
208 <field name="name">Repairs Ready to Start</field>
209 <field name="type">ir.actions.act_window</field>
210 <field name="res_model">mrp.repair</field>
211 <field name="view_type">form</field>
212 <field name="view_mode">tree,form</field>
213 <field name="domain">[('state','!=','draft'),('state','!=','under_repair'),('state','!=','2binvoiced'),('state','!=','invoice_except'),('state','!=','done'),('state','!=','cancel'),]</field>
214 <field name="filter" eval="True"/>
217 <record id="action_repair_2binvoiced_tree" model="ir.actions.act_window">
218 <field name="name">Repairs to be invoiced</field>
219 <field name="type">ir.actions.act_window</field>
220 <field name="res_model">mrp.repair</field>
221 <field name="view_type">form</field>
222 <field name="view_mode">tree,form</field>
223 <field name="domain">[('state','=','2binvoiced')]</field>
224 <field name="filter" eval="True"/>
227 <menuitem action="action_repair_order_tree" id="menu_repair_order" parent="mrp.menu_mrp_root" name="Repairs" sequence="50"/>