Launchpad automatic translations update.
[odoo/odoo.git] / addons / mrp_repair / mrp_repair_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4
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'">
10                 <field name="name" />
11                 <field name="product_id" />
12                 <field name="move_id"/>
13                 <field name="partner_id"/>
14                 <field name="address_id"/>
15                 <field name="location_id" groups="stock.group_locations"/>
16                 <field name="location_dest_id" groups="stock.group_locations"/>
17                 <field name="company_id" groups="base.group_multi_company" invisible="1"/>
18                 <field name="guarantee_limit"/>
19                 <field name="state"/>
20             </tree>
21         </field>
22     </record>
23
24     <record id="view_repair_order_form" model="ir.ui.view">
25         <field name="name">mrp.repair.form</field>
26         <field name="model">mrp.repair</field>
27         <field name="arch" type="xml">
28             <form string="Repair Order" version="7.0">
29                <header>
30                    <button name="repair_confirm" states="draft" string="Confirm Repair" class="oe_highlight"/>
31                    <button name="repair_ready" states="confirmed,ready" string="Start Repair" class="oe_highlight"/>
32                    <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
33                    <button name="action_repair_end" states="under_repair" string="End Repair" class="oe_highlight"/>
34                    <button name="action_invoice_create" states="2binvoiced" string="Create Invoice" class="oe_highlight"/>
35                    <button name="invoice_recreate" states="invoice_except" string="Recreate Invoice"/>
36                    <button name="invoice_corrected" states="invoice_except" string="Invoice Corrected"/>
37                    <button name="action_cancel" string="Cancel Repair" type="object" attrs="{'invisible':['|',('invoice_method','!=','none'), ('state', 'not in',('confirmed','2binvoiced','ready','under_repair', 'invoice_except'))]}"/>
38                    <button name="cancel" states="draft" string="Cancel Repair"/>
39                    <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,done"/>
40                </header>
41                <sheet string="Repairs order">
42                     <h1>
43                         Repair Order <field name="name" class="oe_inline"/>
44                     </h1>
45                     <group>
46                         <group>
47                             <field name="product_id" on_change="onchange_product_id(product_id)" domain="[('type','!=','service')]"/>
48                             <field name="partner_id" on_change="onchange_partner_id(partner_id,address_id)" attrs="{'required':[('invoice_method','!=','none')]}"/>
49                             <field name="address_id" groups="sale.group_delivery_invoice_address"/>
50                             <field name="move_id" on_change="onchange_move_id(product_id, move_id)" context="{'default_product_id':product_id}"/>
51                             <field name="location_id" attrs="{'required':[('deliver_bool','=', True)]}" groups="stock.group_locations"/>
52                             <field name="prodlot_id" on_change="onchange_lot_id(prodlot_id,product_id)" groups="stock.group_production_lot" string="Serial Number"/>
53                         </group>
54                         <group>
55                             <field name="guarantee_limit"/>
56                             <field name="deliver_bool"/>
57                             <field name="repaired" groups="base.group_no_one"/>
58                             <field name="invoiced" groups="base.group_no_one"/>
59                         </group>
60                     </group>
61                 <notebook>
62                     <page string="Operations">
63                         <field name="operations">
64                             <form string="Operations" version="7.0">
65                                 <notebook>
66                                     <page string="Repair Line">
67                                         <group col="4">
68                                             <field name="name"/>
69                                             <field name="product_id" on_change="product_id_change(parent.pricelist_id,product_id,product_uom,product_uom_qty, parent.partner_id)"/>
70                                             <label for="product_uom_qty"/>
71                                             <div>
72                                                 <field name="product_uom_qty" class="oe_inline"/>
73                                                 <field name="product_uom" class="oe_inline" groups="product.group_uom"/>
74                                             </div>
75                                             <field name="price_unit"/>
76                                             <field name="price_subtotal"/>
77                                             <field name="type"  on_change="onchange_operation_type(type,parent.guarantee_limit,parent.company_id,context)"/>
78                                             <field name="to_invoice"/>
79                                             <field name="tax_id" widget="many2many_tags" domain="[('parent_id','=',False),('type_tax_use','&lt;&gt;','purchase')]"/>
80                                             <field name="invoiced"/>
81                                             <field name='prodlot_id' groups="stock.group_production_lot" string="Serial Number"/>
82                                             <field name="location_id" groups="stock.group_locations"/>
83                                             <field name="location_dest_id" groups="stock.group_locations"/>
84                                         </group>
85                                     </page>
86                                     <page string="History">
87                                         <group>
88                                             <field name="move_id" />
89                                             <field name="invoice_line_id"/>
90                                         </group>
91                                     </page>
92                                  </notebook>
93                             </form>
94                             <tree string="Operations" editable="bottom">
95                                 <field name="type" on_change="onchange_operation_type(type,parent.guarantee_limit,parent.company_id,context)"/>
96                                 <field name="product_id" on_change="product_id_change(parent.pricelist_id,product_id,product_uom,product_uom_qty, parent.partner_id)"/>
97                                 <field name='name'/>
98                                 <field name="prodlot_id" groups="stock.group_production_lot" string="Serial Number"/>
99                                 <field name="location_id" groups="stock.group_locations"/>
100                                 <field name="location_dest_id" groups="stock.group_locations"/>
101                                 <field name="product_uom_qty" string="Quantity"/>
102                                 <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
103                                 <field name="price_unit"/>
104                                 <field name="tax_id" widget="many2many_tags"/>
105                                 <field name="to_invoice"/>
106                                 <field name="price_subtotal"/>
107                             </tree>
108                         </field>
109                         <group class="oe_subtotal_footer oe_right">
110                             <field name="amount_untaxed" sum="Untaxed amount"/>
111                             <field name="amount_tax"/>
112                             <div class="oe_subtotal_footer_separator oe_inline">
113                                 <label for="amount_total" />
114                                 <button name="button_dummy"
115                                     states="draft" string="(update)" type="object" class="oe_edit_only oe_link"/>
116                             </div>
117                             <field name="amount_total" nolabel="1" sum="Total amount" class="oe_subtotal_footer_separator"/>
118                         </group>
119                         <div class="oe_clear"/>
120                     </page>
121                     <page string="Invoicing">
122                         <group col="4">
123                             <field name="invoice_method"/>
124                             <field name="partner_invoice_id" attrs="{'readonly':[('invoice_method','=', 'none')],'required':[('invoice_method','!=','none')]}" groups="sale.group_delivery_invoice_address"/>
125                             <field
126                                 name="pricelist_id" groups="product.group_sale_pricelist" context="{'product_id':product_id}"
127                                 attrs="{'readonly':[('invoice_method','=', 'none')]}"/>
128                         </group>
129                         <!-- <field name="invoice_id"/> -->
130                         <field name="fees_lines">
131                             <form string="Fees" version="7.0">
132                                 <label for="name" class="oe_edit_only"/>
133                                 <h2>
134                                     <field name="name"/>
135                                 </h2>
136                                 <group string="Product Information">
137                                     <group>
138                                         <field name="to_invoice"/>
139                                         <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)"/>
140                                         <label for="product_uom_qty"/>
141                                         <div>
142                                             <field name="product_uom_qty" string="Quantity" class="oe_inline"/>
143                                             <field name="product_uom" groups="product.group_uom" class="oe_inline"/>
144                                         </div>
145                                     </group>
146                                     <group>
147                                         <field name="price_unit"/>
148                                         <field widget="many2many_tags" name="tax_id" domain="[('parent_id','=',False),('type_tax_use','&lt;&gt;','purchase')]"/>
149                                         <field name="price_subtotal"/>
150                                     </group>
151                                 </group>
152                                 <group string="History">
153                                     <group>
154                                         <field name="invoiced"/>
155                                     </group>
156                                     <group>
157                                         <field name="invoice_line_id" />
158                                     </group>
159                                 </group>
160                             </form>
161                             <tree string="Fees" editable="bottom">
162                                 <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)"/>
163                                 <field name='name'/>
164                                 <field name="product_uom_qty" string="Quantity"/>
165                                 <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
166                                 <field name="price_unit"/>
167                                 <field name="to_invoice"/>
168                                 <field name="price_subtotal"/>
169                             </tree>
170                         </field>
171                     </page>
172                     <page string="Extra Info">
173                         <group>
174                             <group>
175                                 <field name="picking_id"/>
176                                 <field name="invoice_id" context="{'form_view_ref': 'account.invoice_form'}"/>
177                                 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
178                             </group>
179                             <group>
180                                 <field name="location_dest_id" attrs="{'required':[('deliver_bool','=', True)]}" groups="stock.group_locations"/>
181                             </group>
182                         </group>
183                     </page>
184                     <page string="Notes">
185                         <field name="internal_notes" placeholder="Add internal notes..."/>
186                         <field name="quotation_notes" placeholder="Add quotation notes..."/>
187                     </page>
188                 </notebook>
189                 </sheet>
190                 <div class="oe_chatter">
191                     <field name="message_follower_ids" widget="mail_followers"/>
192                     <field name="message_ids" widget="mail_thread"/>
193                 </div>
194             </form>
195         </field>
196     </record>
197
198
199
200     <record id="view_repair_order_form_filter" model="ir.ui.view">
201           <field name="name">mrp.repair.select</field>
202           <field name="model">mrp.repair</field>
203           <field name="arch" type="xml">
204               <search string="Search Reair Orders">
205                   <field name="name" string="Reair Orders"/>
206                   <field name="state"/>
207                   <filter icon="terp-document-new" string="Quotations" domain="[('state','=','draft')]"/>
208                   <filter icon="terp-check" string="Confirmed" domain="[('state','=','confirmed')]" name="current" />
209                   <filter icon="terp-emblem-important" string="Ready To Repair" domain="[('state','=','ready')]"/>
210                   <separator/>
211                   <filter icon="terp-dolar" string="Invoiced" domain="[('invoiced','=',True)]"/>
212                   <field name="product_id"/>
213                   <field name="partner_id" filter_domain="[('partner_id', 'child_of', self)]"/>
214                   <group expand="0" string="Group By...">
215                       <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
216                       <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
217                       <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
218                       <filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'guarantee_limit'}" help="Guarantee limit"/>
219                       <filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
220                   </group>
221               </search>
222           </field>
223     </record>
224
225
226
227          <record id="action_repair_order_tree" model="ir.actions.act_window">
228             <field name="name">Repair Orders</field>
229             <field name="type">ir.actions.act_window</field>
230             <field name="res_model">mrp.repair</field>
231             <field name="view_type">form</field>
232             <field name="view_mode">tree,form</field>
233             <field name="search_view_id" ref="view_repair_order_form_filter"/>
234             <field name="help" type="html">
235               <p class="oe_view_nocontent_create">
236                 Click to create a reparation order. 
237               </p><p>
238                 In a repair order, you can detail the components you remove,
239                 add or replace and record the time you spent on the different
240                 operations.
241               </p><p>
242                 The repair order uses the warranty date on the Serial Number in
243                 order to know if whether the repair should be invoiced to the
244                 customer or not.
245               </p>
246             </field>
247         </record>
248
249         <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"/>
250
251     </data>
252 </openerp>