[IMP] simplified views
[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" 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" 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"/>
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
98                                 name="pricelist_id" context="product_id=product_id"
99                                 attrs="{'readonly':[('invoice_method','=', 'none')]}"/>
100                             <field name="partner_invoice_id" attrs="{'readonly':[('invoice_method','=', 'none')]}"/>
101                             <!-- <field name="invoice_id"/> -->
102                             <field colspan="4" mode="tree,form" name="fees_lines" nolabel="1" widget="one2many_list">
103                                 <form string="Fees">
104                                     <notebook>
105                                         <page string="Fees Line">
106                                             <field name='name'/>
107                                             <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"/>
108                                             <field name="product_uom_qty" string="Qty"/>
109                                             <field name="product_uom" string="UoM" />
110                                             <field name="price_unit"/>
111                                             <field name="price_subtotal"/>
112                                             <newline/>
113                                             <group colspan="2">
114                                                 <field name="to_invoice"/>
115                                                 <field name="invoiced"/>
116                                             </group>
117                                             <newline/>
118                                             <field colspan="4" name="tax_id" domain="[('parent_id','=',False),('type_tax_use','&gt;&gt;','purchase')]"/>
119                                          </page>
120                                          <page string="History" groups="base.group_extended">
121                                             <field colspan="4" name="invoice_line_id" />
122                                         </page>
123                                       </notebook>
124                                 </form>
125                                 <tree string="Fees" editable="bottom">
126                                     <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)"/>
127                                     <field name='name'/>
128                                     <field name="product_uom_qty" string="Qty"/>
129                                     <field name="product_uom" string="UoM"/>
130                                     <field name="price_unit"/>
131                                     <field name="to_invoice"/>
132                                     <field name="price_subtotal"/>
133                                 </tree>
134                             </field>
135                         </page>
136                         <page string="Quality">
137                             <separator colspan="4" string="Internal Notes"/>
138                             <field colspan="4" name="internal_notes" nolabel="1"/>
139                             <separator colspan="4" string="Quotation Notes"/>
140                             <field colspan="4" name="quotation_notes" nolabel="1"/>
141                         </page>
142                         <page string="Extra Info" groups="base.group_extended">
143                             <field name="invoice_id"/>
144                             <field name="picking_id"/>
145                             <field name="location_id"/>
146                             <field name="location_dest_id" attrs="{'readonly':[('deliver_bool','=', False)], 'required':[('deliver_bool','=', True)]}"/>
147                         </page>
148                     </notebook>
149                 </form>
150             </field>
151         </record>
152
153         <record id="view_repair_order_tree" model="ir.ui.view">
154             <field name="name">mrp.repair.tree</field>
155             <field name="model">mrp.repair</field>
156             <field name="type">tree</field>
157             <field name="arch" type="xml">
158                 <tree string="Repairs order">
159                     <field name="name" select="1" />
160                         <field name="product_id" select="1" />
161                         <field name="prodlot_id"/>
162                         <field name="partner_id"/>
163                         <field name="address_id"/>
164                             <field name="location_id"/>
165                             <field name="state"/>
166                             <field name="move_id"/>
167                             <field name="location_dest_id"/>
168                             <field name="guarantee_limit"/>
169                 </tree>
170             </field>
171         </record>
172
173         <record id="action_repair_order_form" model="ir.actions.act_window">
174             <field name="name">New Repair</field>
175             <field name="type">ir.actions.act_window</field>
176             <field name="res_model">mrp.repair</field>
177             <field name="view_type">form</field>
178             <field name="view_mode">form,tree</field>
179         </record>
180
181          <record id="action_repair_order_tree" model="ir.actions.act_window">
182             <field name="name">Repair Orders</field>
183             <field name="type">ir.actions.act_window</field>
184             <field name="res_model">mrp.repair</field>
185             <field name="view_type">form</field>
186             <field name="view_mode">tree,form</field>
187         </record>
188
189          <record id="action_repair_quotation_tree" model="ir.actions.act_window">
190             <field name="name">Repairs in quotation</field>
191             <field name="type">ir.actions.act_window</field>
192             <field name="res_model">mrp.repair</field>
193             <field name="view_type">form</field>
194             <field name="view_mode">tree,form</field>
195             <field name="domain">[('state','=','draft')]</field>
196             <field name="filter" eval="True"/>
197         </record>
198
199         <record id="action_repair_progress_tree" model="ir.actions.act_window">
200             <field name="name">Repairs in progress</field>
201             <field name="type">ir.actions.act_window</field>
202             <field name="res_model">mrp.repair</field>
203             <field name="view_type">form</field>
204             <field name="view_mode">tree,form</field>
205             <field name="domain">[('state','=','under_repair')]</field>
206             <field name="filter" eval="True"/>
207         </record>
208
209         <record id="action_repair_ready_tree" model="ir.actions.act_window">
210             <field name="name">Repairs Ready to Start</field>
211             <field name="type">ir.actions.act_window</field>
212             <field name="res_model">mrp.repair</field>
213             <field name="view_type">form</field>
214             <field name="view_mode">tree,form</field>
215             <field name="domain">[('state','!=','draft'),('state','!=','under_repair'),('state','!=','2binvoiced'),('state','!=','invoice_except'),('state','!=','done'),('state','!=','cancel'),]</field>
216             <field name="filter" eval="True"/>
217         </record>
218
219         <record id="action_repair_2binvoiced_tree" model="ir.actions.act_window">
220             <field name="name">Repairs to be invoiced</field>
221             <field name="type">ir.actions.act_window</field>
222             <field name="res_model">mrp.repair</field>
223             <field name="view_type">form</field>
224             <field name="view_mode">tree,form</field>
225             <field name="domain">[('state','=','2binvoiced')]</field>
226             <field name="filter" eval="True"/>
227         </record>
228
229         <menuitem action="action_repair_order_tree" id="menu_repair_order" parent="mrp.menu_mrp_manufacturing" name="Repairs" sequence="50"/>
230
231     </data>
232 </openerp>