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