1 <?xml version="1.0" encoding="utf-8"?>
5 <record id="view_repair_order_tree" model="ir.ui.view">
6 <field name="name">mrp.repair.tree</field>
7 <field name="model">mrp.repair</field>
8 <field name="type">tree</field>
9 <field name="arch" type="xml">
10 <tree string="Repairs order">
11 <field name="name" select="1" />
12 <field name="product_id" select="1" />
13 <field name="prodlot_id"/>
14 <field name="partner_id"/>
15 <field name="address_id"/>
16 <field name="location_id"/>
17 <field name="move_id"/>
18 <field name="location_dest_id"/>
19 <field name="guarantee_limit"/>
25 <record id="view_repair_order_form" model="ir.ui.view">
26 <field name="name">mrp.repair.form</field>
27 <field name="model">mrp.repair</field>
28 <field name="type">form</field>
29 <field name="arch" type="xml">
30 <form string="Repairs order">
31 <group col="6" colspan="4">
33 <field name="product_id" select="1" on_change="onchange_product_id(product_id)"/>
34 <field name="deliver_bool"/>
36 <field name="prodlot_id" on_change="onchange_lot_id(prodlot_id,product_id)"/>
37 <field name="move_id" on_change="onchange_move_id(product_id, move_id)"/>
38 <field name="repaired"/>
40 <field name="partner_id" on_change="onchange_partner_id(partner_id,address_id)"/>
41 <field name="address_id" attrs="{'readonly':[('deliver_bool','=', False)]}"/>
42 <field name="invoiced"/>
44 <notebook colspan="4">
45 <page string="Operations">
46 <field name="guarantee_limit" />
48 <field colspan="4" mode="tree,form" name="operations" nolabel="1" widget="one2many_list">
49 <form string="Operations">
51 <page string="Repair Line">
52 <field name="name" colspan="4"/>
53 <field name="product_id" on_change="product_id_change(parent.pricelist_id,product_id,product_uom,product_uom_qty, parent.partner_id)" colspan="4"/>
54 <field name="product_uom_qty" string="Qty" />
55 <field name="product_uom" string="UoM"/>
56 <field name="price_unit"/>
57 <field name="price_subtotal"/>
58 <field name="location_id"/>
59 <field name="location_dest_id"/>
61 <field name="type" on_change="onchange_operation_type(type,parent.guarantee_limit)"/>
63 <field name="to_invoice"/>
64 <field name="invoiced"/>
67 <field colspan="4" name="tax_id" domain="[('parent_id','=',False),('type_tax_use','<>','purchase')]"/>
68 <separator colspan="4" string="States"/>
71 <page string="History" groups="base.group_extended">
72 <field colspan="4" name="move_id" />
73 <field colspan="4" name="invoice_line_id"/>
78 <tree string="Operations" editable="bottom">
79 <field name="type" on_change="onchange_operation_type(type,parent.guarantee_limit)"/>
80 <field name="product_id" on_change="product_id_change(parent.pricelist_id,product_id,product_uom,product_uom_qty, parent.partner_id)"/>
82 <field name="location_id"/>
83 <field name="location_dest_id"/>
84 <field name="product_uom_qty" string="Qty"/>
85 <field name="product_uom" string="UoM"/>
86 <field name="price_unit"/>
87 <field name="tax_id"/>
88 <field name="to_invoice"/>
89 <field name="price_subtotal"/>
93 <group col="7" colspan="4">
94 <field name="amount_untaxed" sum="Untaxed amount"/>
95 <field name="amount_tax"/>
96 <field name="amount_total" sum="Total amount"/>
97 <button name="button_dummy" states="draft" string="Compute" type="object"/>
100 <group col="13" colspan="4">
101 <field name="state"/>
102 <button name="repair_confirm" states="draft" string="Confirm Repair" icon="gtk-apply"/>
103 <button name="repair_ready" states="confirmed" string="Start Repair" icon="gtk-execute"/>
104 <button name="action_repair_start" states="ready" string="Start Repair" icon="gtk-execute"/>
105 <button name="action_repair_end" states="under_repair" string="End Repair" icon="gtk-ok"/>
106 <button name="invoice_recreate" states="invoice_except" string="Recreate Invoice" icon="gtk-convert"/>
107 <button name="invoice_corrected" states="invoice_except" string="Invoice Corrected" icon="gtk-apply"/>
108 <button name="action_invoice_create" states="2binvoiced" string="Make Invoice" icon="gtk-ok"/>
109 <button name="%(action_cancel_repair)d" states="invoice_except" string="Cancel Repair" type="action" icon="gtk-cancel"/>
110 <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
111 <button name="cancel" states="draft" string="Cancel Repair" icon="gtk-cancel"/>
112 <button name="%(action_cancel_repair)d" states="confirmed,2binvoiced,ready,under_repair" string="Cancel Repair" type="action" icon="gtk-cancel"/>
115 <page string="Invoicing">
116 <field name="invoice_method" colspan="4"/>
118 name="pricelist_id" context="product_id=product_id"
119 attrs="{'readonly':[('invoice_method','=', 'none')]}"/>
120 <field name="partner_invoice_id" attrs="{'readonly':[('invoice_method','=', 'none')]}"/>
121 <!-- <field name="invoice_id"/> -->
122 <field colspan="4" mode="tree,form" name="fees_lines" nolabel="1" widget="one2many_list">
125 <page string="Fees Line">
127 <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"/>
128 <field name="product_uom_qty" string="Qty"/>
129 <field name="product_uom" string="UoM" />
130 <field name="price_unit"/>
131 <field name="price_subtotal"/>
134 <field name="to_invoice"/>
135 <field name="invoiced"/>
138 <field colspan="4" name="tax_id" domain="[('parent_id','=',False),('type_tax_use','<>','purchase')]"/>
140 <page string="History" groups="base.group_extended">
141 <field colspan="4" name="invoice_line_id" />
145 <tree string="Fees" editable="bottom">
146 <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)"/>
148 <field name="product_uom_qty" string="Qty"/>
149 <field name="product_uom" string="UoM"/>
150 <field name="price_unit"/>
151 <field name="to_invoice"/>
152 <field name="price_subtotal"/>
156 <page string="Quality">
157 <separator colspan="4" string="Internal Notes"/>
158 <field colspan="4" name="internal_notes" nolabel="1"/>
159 <separator colspan="4" string="Quotation Notes"/>
160 <field colspan="4" name="quotation_notes" nolabel="1"/>
162 <page string="Extra Info" groups="base.group_extended">
163 <field name="invoice_id"/>
164 <field name="picking_id"/>
165 <field name="location_id"/>
166 <field name="location_dest_id" attrs="{'readonly':[('deliver_bool','=', False)], 'required':[('deliver_bool','=', True)]}"/>
175 <record id="view_repair_order_form_filter" model="ir.ui.view">
176 <field name="name">mrp.repair.select</field>
177 <field name="model">mrp.repair</field>
178 <field name="type">search</field>
179 <field name="arch" type="xml">
180 <search string="Search Reair Orders">
181 <group col='4' colspan='4'>
182 <field name="name" />
183 <field name="product_id" />
186 <group expand="1" string="Group By" colspan="10" col="8">
187 <filter string="Product" icon="terp-mrp" domain="[]" context="{'group_by':'product_id'}"/>
188 <filter string="State" icon="terp-mrp" domain="[]" context="{'group_by':'state'}"/>
189 <filter string="Partner" icon="terp-mrp" domain="[]" context="{'group_by':'partner_id'}"/>
195 <record id="action_repair_order_form" model="ir.actions.act_window">
196 <field name="name">New Repair</field>
197 <field name="type">ir.actions.act_window</field>
198 <field name="res_model">mrp.repair</field>
199 <field name="view_type">form</field>
200 <field name="view_mode">form,tree</field>
203 <record id="action_repair_order_tree" model="ir.actions.act_window">
204 <field name="name">Repair Orders</field>
205 <field name="type">ir.actions.act_window</field>
206 <field name="res_model">mrp.repair</field>
207 <field name="view_type">form</field>
208 <field name="view_mode">tree,form</field>
209 <field name="search_view_id" ref="view_repair_order_form_filter"/>
212 <record id="action_repair_quotation_tree" model="ir.actions.act_window">
213 <field name="name">Repairs in quotation</field>
214 <field name="type">ir.actions.act_window</field>
215 <field name="res_model">mrp.repair</field>
216 <field name="view_type">form</field>
217 <field name="view_mode">tree,form</field>
218 <field name="domain">[('state','=','draft')]</field>
219 <field name="filter" eval="True"/>
222 <record id="action_repair_progress_tree" model="ir.actions.act_window">
223 <field name="name">Repairs in progress</field>
224 <field name="type">ir.actions.act_window</field>
225 <field name="res_model">mrp.repair</field>
226 <field name="view_type">form</field>
227 <field name="view_mode">tree,form</field>
228 <field name="domain">[('state','=','under_repair')]</field>
229 <field name="filter" eval="True"/>
232 <record id="action_repair_ready_tree" model="ir.actions.act_window">
233 <field name="name">Repairs Ready to Start</field>
234 <field name="type">ir.actions.act_window</field>
235 <field name="res_model">mrp.repair</field>
236 <field name="view_type">form</field>
237 <field name="view_mode">tree,form</field>
238 <field name="domain">[('state','!=','draft'),('state','!=','under_repair'),('state','!=','2binvoiced'),('state','!=','invoice_except'),('state','!=','done'),('state','!=','cancel'),]</field>
239 <field name="filter" eval="True"/>
242 <record id="action_repair_2binvoiced_tree" model="ir.actions.act_window">
243 <field name="name">Repairs to be invoiced</field>
244 <field name="type">ir.actions.act_window</field>
245 <field name="res_model">mrp.repair</field>
246 <field name="view_type">form</field>
247 <field name="view_mode">tree,form</field>
248 <field name="domain">[('state','=','2binvoiced')]</field>
249 <field name="filter" eval="True"/>
252 <menuitem action="action_repair_order_tree" id="menu_repair_order" parent="mrp.menu_mrp_manufacturing" name="Repairs" sequence="50"/>