Changed model of Operations in mrp_repair, inherited stock.move, changes in view
[odoo/odoo.git] / addons / mrp_repair / mrp_repair_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4     
5     <wizard 
6             id="action_cancel_repair" 
7             model="mrp.repair" 
8             name="mrp.repair.cancel"
9             string="Cancel Repair"
10             menu = "False"
11             multi = "True"
12             />
13             
14     <record id="view_repair_order_form" model="ir.ui.view">
15             <field name="name">mrp.repair.form</field>
16             <field name="model">mrp.repair</field>
17             <field name="type">form</field>
18             <field name="arch" type="xml">
19                 <form string="Repairs order">
20                     <group col="4" colspan="4">
21                         <field name="name"/>
22                         <newline/>
23                         <field name="product_id" select="1"  on_change="onchange_product_id(product_id, move_id)"/>
24                         <field name="prodlot_id" select="2" on_change="onchange_lot_id(prodlot_id)"/>
25                         <field name="partner_id" select="2" on_change="onchange_partner_id(partner_id)" />
26                         <field name="address_id"/>
27                     </group>
28                     <notebook colspan="4">
29                         <page string="Products">
30                             <field name="location_id"/>
31                             <field name="move_id"   on_change="onchange_product_id(product_id, move_id)"/>
32                             <field name="location_dest_id"/>
33                             <field name="guarantee_limit" />
34                             <newline/>
35                             <separator colspan="4" string="Operations"/>
36                             <field colspan="4" mode="tree,form" name="operations" nolabel="1" widget="one2many_list">
37                                 <form string="Operations">
38                                     <field name="type"  on_change="onchange_operation_type(type)"/>
39                                     <field name="product_id" on_change="product_id_change(parent.pricelist_id,product_id,product_uom,product_uom_qty, parent.partner_id)"/>
40                                     <field name="product_uom_qty" string="Qty"/>
41                                     <field name="product_uom" string="UoM"/>
42                                     <field name="price_unit"/>
43                                     <field name="discount"/>
44                                     <field name="price_subtotal"/>
45                                     <field name="delay"/>
46                                     <field name="location_id"/>
47                                     <field name="location_dest_id"/>
48                                     <field name="state"/>
49                                 </form>
50                                 <tree string="Operations lines"> <!-- editable="bottom"> -->
51                                     <field name="type"  on_change="onchange_operation_type(type)"/>
52                                     <field name="product_id" on_change="product_id_change(parent.pricelist_id,product_id,product_uom,product_uom_qty, parent.partner_id)"/>
53                                     <field name="product_uom_qty" string="Qty"/>
54                                     <field name="product_uom" string="UoM"/>
55                                     <field name="discount"/>
56                                     <field name="price_unit"/>
57                                     <field name="price_net"/>
58                                     <field name="price_subtotal"/>
59                                     <field name="invoice"/>
60                                 </tree>
61                             </field>
62                             <newline/>
63                             <group col="13" colspan="4">
64                                 <field name="state" select="2"/>
65                                 <button name="repair_confirm" states="draft" string="Confirm Repair"/>
66                                 <button name="repair_done" states="confirmed" string="Repair Done"/>
67                                 <button name="make_invoice" states="2binvoiced" string="Make Invoice"/>
68                                 <button name="%(action_cancel_repair)d" states="draft,confirmed,2binvoiced" string="Cancel Repair" type="action"/>
69                                 <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
70                             </group>
71                         </page>
72                         <page string="Invoicing">
73                             <field name="pricelist_id" context="product_id=product_id"/>
74                             <field name="partner_invoice_id"/>
75                             <field name="invoice_method"/>
76                             <field name="invoice_id"/>
77                             <separator colspan="4" string="Fees"/>
78                             <field colspan="4" mode="tree,form" name="fees_lines" nolabel="1" widget="one2many_list">
79                             <form string="Fees Line">
80                                     <field name="product_id" on_change="product_id_change(product_id,product_uom)" />
81                                     <field name="product_uom_qty" string="Qty"/>
82                                     <field name="product_uom" string="UoM" /> <!--on_change="product_id_change(product_id,product_uom)" /> -->
83                                     <field name="price_unit"/>
84                                 </form>
85                                 <tree string="Fees lines"> <!-- editable="bottom"> -->
86                                     <field name="product_id"/>
87                                     <field name="product_uom_qty" string="Qty"/>
88                                     <field name="product_uom" string="UoM"/>
89                                     <field name="price_unit"/>
90                                 </tree>
91                                 </field>
92                         </page>
93                         <page string="Quality">
94                             <separator colspan="4" string="Internal Notes"/>
95                             <field colspan="4" name="internal_notes" nolabel="1"/>
96                             <separator colspan="4" string="Quotation Notes"/>
97                             <field colspan="4" name="quotation_notes" nolabel="1"/>
98                         </page>
99                     </notebook>
100                 </form>
101             </field>
102         </record>
103         
104         <record id="view_repair_order_tree" model="ir.ui.view">
105             <field name="name">mrp.repair.tree</field>
106             <field name="model">mrp.repair</field>
107             <field name="type">tree</field>
108             <field name="arch" type="xml">
109                 <tree string="Repairs order">
110                         <field name="product_id" select="1" />
111                         <field name="prodlot_id" select="2"/>
112                         <field name="partner_id" select="2"/>
113                         <field name="address_id"/>
114                             <field name="location_id"/>
115                             <field name="move_id"/>
116                             <field name="location_dest_id"/>
117                             <field name="guarantee_limit"/>
118                 </tree>
119             </field>
120         </record>
121         
122         <record id="action_repair_order_form" model="ir.actions.act_window">
123             <field name="name">New Repair</field>
124             <field name="type">ir.actions.act_window</field>
125             <field name="res_model">mrp.repair</field>
126             <field name="view_type">form</field>
127             <field name="view_mode">form,tree</field>
128         </record>
129         
130          <record id="action_repair_order_tree" model="ir.actions.act_window">
131             <field name="name">Repair Orders</field>
132             <field name="type">ir.actions.act_window</field>
133             <field name="res_model">mrp.repair</field>
134             <field name="view_type">form</field>
135             <field name="view_mode">tree,form</field>
136         </record>
137         
138          <record id="action_repair_quotation_tree" model="ir.actions.act_window">
139             <field name="name">Repairs in quotation</field>
140             <field name="type">ir.actions.act_window</field>
141             <field name="res_model">mrp.repair</field>
142             <field name="view_type">form</field>
143             <field name="view_mode">tree,form</field>
144             <field name="domain">[('state','=','draft')]</field>
145         </record>
146         
147         <record id="action_repair_progress_tree" model="ir.actions.act_window">
148             <field name="name">Repairs in progress</field>
149             <field name="type">ir.actions.act_window</field>
150             <field name="res_model">mrp.repair</field>
151             <field name="view_type">form</field>
152             <field name="view_mode">tree,form</field>
153             <field name="domain">[('state','=','confirmed')]</field>
154         </record>
155         
156         <record id="action_repair_2binvoiced_tree" model="ir.actions.act_window">
157             <field name="name">Repairs to be invoiced</field>
158             <field name="type">ir.actions.act_window</field>
159             <field name="res_model">mrp.repair</field>
160             <field name="view_type">form</field>
161             <field name="view_mode">tree,form</field>
162             <field name="domain">[('state','=','2binvoiced')]</field>
163         </record>
164         
165         <menuitem action="action_repair_order_tree" id="menu_repair_order" parent="mrp.menu_mrp_root" name="Repairs"/>
166         
167         <menuitem action="action_repair_quotation_tree" id="menu_repair_quotation" parent="menu_repair_order"/>
168         
169         <menuitem action="action_repair_progress_tree" id="menu_repair_progress" parent="menu_repair_order"/>
170         
171         <menuitem action="action_repair_2binvoiced_tree" id="menu_repair_2binvoiced" parent="menu_repair_order"/>
172         
173         <menuitem action="action_repair_order_form" id="menu_repair_form" parent="menu_repair_order" sequence = "50"/>
174         
175         
176     </data>
177 </openerp>