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="arch" type="xml">
9 <tree string="Repairs order" colors="gray:state in ('done','cancel');black:state not in ('done','cancel');blue:state=='draft'">
11 <field name="product_id" />
12 <field name="partner_id"/>
13 <field name="address_id"/>
14 <field name="location_id" groups="stock.group_locations"/>
15 <field name="location_dest_id" groups="stock.group_locations"/>
16 <field name="company_id" groups="base.group_multi_company" invisible="1"/>
17 <field name="guarantee_limit"/>
23 <record id="view_repair_order_form" model="ir.ui.view">
24 <field name="name">mrp.repair.form</field>
25 <field name="model">mrp.repair</field>
26 <field name="arch" type="xml">
27 <form string="Repair Order" version="7.0">
29 <button name="repair_confirm" states="draft" string="Confirm Repair" class="oe_highlight"/>
30 <button name="repair_ready" states="confirmed,ready" string="Start Repair" class="oe_highlight"/>
31 <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
32 <button name="action_repair_end" states="under_repair" string="End Repair" class="oe_highlight"/>
33 <button name="action_invoice_create" states="2binvoiced" string="Create Invoice" class="oe_highlight"/>
34 <button name="invoice_recreate" states="invoice_except" string="Recreate Invoice"/>
35 <button name="invoice_corrected" states="invoice_except" string="Invoice Corrected"/>
36 <button name="action_cancel" string="Cancel Repair" type="object" attrs="{'invisible':['|',('invoice_method','!=','none'), ('state', 'not in',('confirmed','2binvoiced','ready','under_repair', 'invoice_except'))]}"/>
37 <button name="cancel" states="draft" string="Cancel Repair"/>
38 <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,done"/>
40 <sheet string="Repairs order">
42 Repair Order <field name="name" class="oe_inline"/>
46 <field name="product_id" on_change="onchange_product_id(product_id)" domain="[('type','!=','service')]"/>
47 <label for="product_qty"/>
49 <field name="product_qty" class="oe_inline"/>
50 <field name="product_uom" groups="product.group_uom" on_change="onchange_product_uom(product_id, product_uom)" class="oe_inline"/>
52 <field name="lot_id" domain="[('product_id', '=', product_id)]" context="{'default_product_id': product_id}" groups="stock.group_production_lot"/>
53 <field name="partner_id" on_change="onchange_partner_id(partner_id,address_id)" attrs="{'required':[('invoice_method','!=','none')]}"/>
54 <field name="address_id" groups="sale.group_delivery_invoice_address"/>
57 <field name="location_id" on_change="onchange_location_id(location_id)" groups="stock.group_locations" domain="[('usage', 'in', ('internal', 'customer'))]"/>
58 <field name="location_dest_id" groups="stock.group_locations" domain="[('usage', 'in', ('internal', 'customer'))]"/>
59 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
60 <field name="guarantee_limit"/>
64 <page string="Operations">
65 <field name="operations" context="{'default_product_uom_qty': product_qty}">
66 <form string="Operations" version="7.0">
68 <page string="Repair Line">
71 <field name="product_id" on_change="product_id_change(parent.pricelist_id,product_id,product_uom,product_uom_qty, parent.partner_id)"/>
72 <label for="product_uom_qty"/>
74 <field name="product_uom_qty" class="oe_inline"/>
75 <field name="product_uom" class="oe_inline" groups="product.group_uom"/>
77 <field name="price_unit"/>
78 <field name="price_subtotal"/>
79 <field name="type" on_change="onchange_operation_type(type,parent.guarantee_limit,parent.company_id,context)"/>
80 <field name="to_invoice"/>
81 <field name="tax_id" widget="many2many_tags" domain="[('parent_id','=',False),('type_tax_use','<>','purchase')]"/>
82 <field name="invoiced"/>
83 <field name="location_id" groups="stock.group_locations"/>
84 <field name="location_dest_id" groups="stock.group_locations"/>
87 <page string="History">
89 <field name="move_id" />
90 <field name="invoice_line_id"/>
95 <tree string="Operations" editable="bottom">
96 <field name="type" on_change="onchange_operation_type(type,parent.guarantee_limit,parent.company_id,context)"/>
97 <field name="product_id" on_change="product_id_change(parent.pricelist_id,product_id,product_uom,product_uom_qty, parent.partner_id)"/>
99 <field name="lot_id" domain="[('product_id', '=', product_id)]" context="{'default_product_id': product_id}" groups="stock.group_production_lot"/>
100 <field name="location_id" groups="stock.group_locations"/>
101 <field name="location_dest_id" groups="stock.group_locations"/>
102 <field name="product_uom_qty" string="Quantity"/>
103 <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
104 <field name="price_unit"/>
105 <field name="tax_id" widget="many2many_tags"/>
106 <field name="to_invoice"/>
107 <field name="price_subtotal"/>
110 <group class="oe_subtotal_footer oe_right">
111 <field name="amount_untaxed" sum="Untaxed amount"/>
112 <field name="amount_tax"/>
113 <div class="oe_subtotal_footer_separator oe_inline">
114 <label for="amount_total" />
115 <button name="button_dummy"
116 states="draft" string="(update)" type="object" class="oe_edit_only oe_link"/>
118 <field name="amount_total" nolabel="1" sum="Total amount" class="oe_subtotal_footer_separator"/>
120 <div class="oe_clear"/>
122 <page string="Invoicing">
124 <field name="invoice_method"/>
125 <field name="invoice_id" context="{'form_view_ref': 'account.invoice_form'}"/>
126 <field name="partner_invoice_id" attrs="{'readonly':[('invoice_method','=', 'none')],'required':[('invoice_method','!=','none')]}" groups="sale.group_delivery_invoice_address"/>
128 name="pricelist_id" groups="product.group_sale_pricelist" context="{'product_id':product_id}"
129 attrs="{'readonly':[('invoice_method','=', 'none')]}"/>
131 <!-- <field name="invoice_id"/> -->
132 <separator string="Fees Lines"/>
133 <field name="fees_lines" attrs="{'readonly': [('invoice_method','=', 'none')]}">
134 <form string="Fees" version="7.0">
135 <label for="name" class="oe_edit_only"/>
139 <group string="Product Information">
141 <field name="to_invoice"/>
142 <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)"/>
143 <label for="product_uom_qty"/>
145 <field name="product_uom_qty" string="Quantity" class="oe_inline"/>
146 <field name="product_uom" groups="product.group_uom" class="oe_inline"/>
150 <field name="price_unit"/>
151 <field widget="many2many_tags" name="tax_id" domain="[('parent_id','=',False),('type_tax_use','<>','purchase')]"/>
152 <field name="price_subtotal"/>
155 <group string="History">
157 <field name="invoiced"/>
160 <field name="invoice_line_id" />
164 <tree string="Fees" editable="bottom">
165 <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)"/>
167 <field name="product_uom_qty" string="Quantity"/>
168 <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
169 <field name="price_unit"/>
170 <field name="to_invoice"/>
171 <field name="price_subtotal"/>
175 <page string="Extra Info" groups="base.group_no_one">
178 <field name="move_id"/>
181 <field name="repaired"/>
182 <field name="invoiced"/>
186 <page string="Notes">
187 <field name="internal_notes" placeholder="Add internal notes..."/>
188 <field name="quotation_notes" placeholder="Add quotation notes..."/>
192 <div class="oe_chatter">
193 <field name="message_follower_ids" widget="mail_followers"/>
194 <field name="message_ids" widget="mail_thread"/>
202 <record id="view_repair_order_form_filter" model="ir.ui.view">
203 <field name="name">mrp.repair.select</field>
204 <field name="model">mrp.repair</field>
205 <field name="arch" type="xml">
206 <search string="Search Reair Orders">
207 <field name="name" string="Reair Orders"/>
208 <field name="state"/>
209 <filter icon="terp-document-new" string="Quotations" domain="[('state','=','draft')]"/>
210 <filter icon="terp-check" string="Confirmed" domain="[('state','=','confirmed')]" name="current" />
211 <filter icon="terp-emblem-important" string="Ready To Repair" domain="[('state','=','ready')]"/>
213 <filter icon="terp-dolar" string="Invoiced" domain="[('invoiced','=',True)]"/>
214 <field name="product_id"/>
215 <field name="partner_id" filter_domain="[('partner_id', 'child_of', self)]"/>
216 <group expand="0" string="Group By...">
217 <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
218 <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
219 <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
220 <filter string="Guarantee limit Month" icon="terp-go-month" domain="[]" context="{'group_by':'guarantee_limit'}" help="Guarantee limit by Month"/>
221 <filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
229 <record id="action_repair_order_tree" model="ir.actions.act_window">
230 <field name="name">Repair Orders</field>
231 <field name="type">ir.actions.act_window</field>
232 <field name="res_model">mrp.repair</field>
233 <field name="view_type">form</field>
234 <field name="view_mode">tree,form</field>
235 <field name="search_view_id" ref="view_repair_order_form_filter"/>
236 <field name="help" type="html">
237 <p class="oe_view_nocontent_create">
238 Click to create a reparation order.
240 In a repair order, you can detail the components you remove,
241 add or replace and record the time you spent on the different
244 The repair order uses the warranty date on the Serial Number in
245 order to know if whether the repair should be invoiced to the
251 <menuitem action="action_repair_order_tree" id="menu_repair_order" parent="mrp.menu_mrp_manufacturing" groups="mrp.group_mrp_user" name="Repair Orders" sequence="50"/>