4c3cf5a08bcf3e50f25bc9a0b951670e7a4d8bf6
[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_form" model="ir.ui.view">
6             <field name="name">mrp.repair.form</field>
7             <field name="model">mrp.repair</field>
8             <field name="type">form</field>
9             <field name="arch" type="xml">
10                 <form string="Repairs order">
11                     <group col="6" colspan="4">
12                         <field name="name"/>
13                         <field name="product_id" select="1"  on_change="onchange_product_id(product_id)"/>
14                         <field name="deliver_bool"/>
15                         <newline/>
16                         <field name="prodlot_id" select="2" on_change="onchange_lot_id(prodlot_id,product_id)"/>
17                         <field name="move_id" on_change="onchange_move_id(product_id, move_id)"/>
18                         <field name="repaired"/>
19                         <newline/>
20                         <field name="partner_id" select="2" on_change="onchange_partner_id(partner_id,address_id)"/>
21                         <field name="address_id"  attrs="{'readonly':[('deliver_bool','=', False)]}"/>
22                         <field name="invoiced"/>
23                     </group>
24                     <notebook colspan="4">
25                         <page string="Operations">
26                             <field name="guarantee_limit" />
27                             <newline/>
28                             <field colspan="4" mode="tree,form" name="operations" nolabel="1" widget="one2many_list">
29                                 <form string="Operations">
30                                     <notebook>
31                                         <page string="Repair Line">
32                                                     <field name="name" colspan="4"/>
33                                                     <field name="product_id" on_change="product_id_change(parent.pricelist_id,product_id,product_uom,product_uom_qty, parent.partner_id)" colspan="4"/>
34                                                     <field name="product_uom_qty" string="Qty" />
35                                                     <field name="product_uom" string="UoM"/>
36                                                     <field name="price_unit"/>
37                                                     <field name="price_subtotal"/>
38                                                     <field name="location_id"/>
39                                                     <field name="location_dest_id"/>
40                                             <newline/>
41                                             <field name="type"  on_change="onchange_operation_type(type,parent.guarantee_limit)"/>
42                                             <group colspan="2">
43                                                 <field name="to_invoice"/>
44                                                     <field name="invoiced"/>
45                                             </group>
46                                             <newline/>
47                                             <field colspan="4" name="tax_id" domain="[('parent_id','=',False),('type_tax_use','&lt;&gt;','purchase')]"/>
48                                             <separator colspan="4" string="States"/>
49                                             <field name="state"/>
50                                                                                 </page>
51                                         <page string="History" groups="base.group_extended">
52                                             <field colspan="4" name="move_id" />
53                                             <field colspan="4" name="invoice_line_id"/>
54                                         </page>
55
56                                      </notebook>
57                                 </form>
58                                 <tree string="Operations" editable="bottom">
59                                     <field name="type" on_change="onchange_operation_type(type,parent.guarantee_limit)"/>
60                                     <field name="product_id" on_change="product_id_change(parent.pricelist_id,product_id,product_uom,product_uom_qty, parent.partner_id)"/>
61                                     <field name='name'/>
62                                     <field name="location_id"/>
63                                     <field name="location_dest_id"/>
64                                     <field name="product_uom_qty" string="Qty"/>
65                                     <field name="product_uom" string="UoM"/>
66                                     <field name="price_unit"/>
67                                     <field name="tax_id"/>
68                                     <field name="to_invoice"/>
69                                     <field name="price_subtotal"/>
70                                 </tree>
71                             </field>
72                             <newline/>
73                             <group col="7" colspan="4">
74                                 <field name="amount_untaxed" sum="Untaxed amount"/>
75                                 <field name="amount_tax"/>
76                                 <field name="amount_total" sum="Total amount"/>
77                                 <button name="button_dummy" states="draft" string="Compute" type="object"/>
78                             </group>
79                             <newline/>
80                             <group col="13" colspan="4">
81                                 <field name="state" select="2"/>
82                                 <button name="repair_confirm" states="draft" string="Confirm Repair"/>
83                                 <button name="repair_ready" states="confirmed" string="Start Repair"/>
84                                 <button name="action_repair_start" states="ready" string="Start Repair"/>
85                                 <button name="action_repair_end" states="under_repair" string="End Repair"/>
86                                 <button name="invoice_recreate" states="invoice_except" string="Recreate Invoice"/>
87                                 <button name="invoice_corrected" states="invoice_except" string="Invoice Corrected"/>
88                                 <button name="action_invoice_create" states="2binvoiced" string="Make Invoice"/>
89                                 <button name="%(action_cancel_repair)d" states="invoice_except" string="Cancel Repair" type="action"/>
90                                 <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
91                                 <button name="cancel" states="draft" string="Cancel Repair"/>
92                                 <button name="%(action_cancel_repair)d" states="confirmed,2binvoiced,ready,under_repair" string="Cancel Repair" type="action"/>
93                             </group>
94                         </page>
95                         <page string="Invoicing">
96                             <field name="invoice_method" colspan="4" />
97                             <field name="pricelist_id" context="product_id=product_id" attrs="{'readonly':[('invoice_method','=', 'none')]}"/>
98                             <field name="partner_invoice_id" attrs="{'readonly':[('invoice_method','=', 'none')]}"/>
99                             <!--<field name="invoice_id"/>-->
100                             <field colspan="4" mode="tree,form" name="fees_lines" nolabel="1" widget="one2many_list">
101                                 <form string="Fees">
102                                     <notebook>
103                                         <page string="Fees Line">
104                                             <field name='name'/>
105                                             <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"/>
106                                             <field name="product_uom_qty" string="Qty"/>
107                                             <field name="product_uom" string="UoM" />
108                                             <field name="price_unit"/>
109                                             <field name="price_subtotal"/>
110                                             <newline/>
111                                             <group colspan="2">
112                                                 <field name="to_invoice"/>
113                                                 <field name="invoiced"/>
114                                             </group>
115                                             <newline/>
116                                             <field colspan="4" name="tax_id" domain="[('parent_id','=',False),('type_tax_use','&gt;&gt;','purchase')]"/>
117                                          </page>
118                                                                                  <page string="History" groups="base.group_extended">
119                                             <field colspan="4" name="invoice_line_id" />
120                                         </page>
121                                       </notebook>
122                                 </form>
123                                 <tree string="Fees" editable="bottom">
124                                     <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)"/>
125                                     <field name='name'/>
126                                     <field name="product_uom_qty" string="Qty"/>
127                                     <field name="product_uom" string="UoM"/>
128                                     <field name="price_unit"/>
129                                     <field name="to_invoice"/>
130                                     <field name="price_subtotal"/>
131                                 </tree>
132                             </field>
133                         </page>
134                         <page string="Quality">
135                             <separator colspan="4" string="Internal Notes"/>
136                             <field colspan="4" name="internal_notes" nolabel="1"/>
137                             <separator colspan="4" string="Quotation Notes"/>
138                             <field colspan="4" name="quotation_notes" nolabel="1"/>
139                         </page>
140                         <page string="Extra Info" groups="base.group_extended">
141                             <field name="invoice_id"/>
142                             <field name="picking_id"/>
143                             <field name="location_id"/>
144                             <field name="location_dest_id" attrs="{'readonly':[('deliver_bool','=', False)], 'required':[('deliver_bool','=', True)]}"/>
145                         </page>
146                     </notebook>
147                 </form>
148             </field>
149         </record>
150
151         <record id="view_repair_order_tree" model="ir.ui.view">
152             <field name="name">mrp.repair.tree</field>
153             <field name="model">mrp.repair</field>
154             <field name="type">tree</field>
155             <field name="arch" type="xml">
156                 <tree string="Repairs order">
157                         <field name="name" select="1" />
158                         <field name="product_id" select="1" />
159                         <field name="prodlot_id" select="2"/>
160                         <field name="partner_id" select="2"/>
161                         <field name="address_id"/>
162                             <field name="location_id"/>
163                             <field name="state" select="2"/>
164                             <field name="move_id"/>
165                             <field name="location_dest_id"/>
166                             <field name="guarantee_limit"/>
167                 </tree>
168             </field>
169         </record>
170
171         <record id="action_repair_order_form" model="ir.actions.act_window">
172             <field name="name">New Repair</field>
173             <field name="type">ir.actions.act_window</field>
174             <field name="res_model">mrp.repair</field>
175             <field name="view_type">form</field>
176             <field name="view_mode">form,tree</field>
177         </record>
178
179          <record id="action_repair_order_tree" model="ir.actions.act_window">
180             <field name="name">Repair Orders</field>
181             <field name="type">ir.actions.act_window</field>
182             <field name="res_model">mrp.repair</field>
183             <field name="view_type">form</field>
184             <field name="view_mode">tree,form</field>
185         </record>
186
187          <record id="action_repair_quotation_tree" model="ir.actions.act_window">
188             <field name="name">Repairs in quotation</field>
189             <field name="type">ir.actions.act_window</field>
190             <field name="res_model">mrp.repair</field>
191             <field name="view_type">form</field>
192             <field name="view_mode">tree,form</field>
193             <field name="domain">[('state','=','draft')]</field>
194                 <field name="filter" eval="True"/>
195         </record>
196
197         <record id="action_repair_progress_tree" model="ir.actions.act_window">
198             <field name="name">Repairs in progress</field>
199             <field name="type">ir.actions.act_window</field>
200             <field name="res_model">mrp.repair</field>
201             <field name="view_type">form</field>
202             <field name="view_mode">tree,form</field>
203             <field name="domain">[('state','=','under_repair')]</field>
204                 <field name="filter" eval="True"/>
205         </record>
206
207         <record id="action_repair_ready_tree" model="ir.actions.act_window">
208             <field name="name">Repairs Ready to Start</field>
209             <field name="type">ir.actions.act_window</field>
210             <field name="res_model">mrp.repair</field>
211             <field name="view_type">form</field>
212             <field name="view_mode">tree,form</field>
213             <field name="domain">[('state','!=','draft'),('state','!=','under_repair'),('state','!=','2binvoiced'),('state','!=','invoice_except'),('state','!=','done'),('state','!=','cancel'),]</field>
214                 <field name="filter" eval="True"/>
215         </record>
216
217         <record id="action_repair_2binvoiced_tree" model="ir.actions.act_window">
218             <field name="name">Repairs to be invoiced</field>
219             <field name="type">ir.actions.act_window</field>
220             <field name="res_model">mrp.repair</field>
221             <field name="view_type">form</field>
222             <field name="view_mode">tree,form</field>
223             <field name="domain">[('state','=','2binvoiced')]</field>
224             <field name="filter" eval="True"/>
225         </record>
226
227         <menuitem action="action_repair_order_tree" id="menu_repair_order" parent="mrp.menu_mrp_root" name="Repairs" sequence="50"/>
228
229     </data>
230 </openerp>