[FIX] sale_layout: increase priority of sale_order inherited view as it was conflicti...
[odoo/odoo.git] / addons / sale_layout / sale_layout_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3         <data>
4              <record id="sale.action_order_line_tree2" model="ir.actions.act_window">
5                <field name="domain">[('layout_type','=', 'article')]</field>
6              </record>
7                 <record model="ir.ui.view" id="view_order_line_form2_inherit_1">
8                         <field name="name">sale.order.line.form2.inherit_1</field>
9                         <field name="model">sale.order.line</field>
10                         <field name="inherit_id" ref="sale.view_order_line_form2"/>
11                         <field name="type">form</field>
12                         <field name="arch" type="xml">
13                                 <xpath expr="/form/notebook/page/field[@name='name']" position="before">
14                                         <field name="layout_type" select="1" on_change="onchange_sale_order_line_view(layout_type)" />
15                                         <field name="sequence"/>
16                                 </xpath>
17                         </field>
18                 </record>
19
20                 <record model="ir.ui.view" id="view_order_form_inherit_1">
21                         <field name="name">sale.order.form.inherit_1</field>
22                         <field name="model">sale.order</field>
23                         <field name="inherit_id" ref="sale.view_order_form"/>
24                         <field name="priority">30</field>
25                         <field name="type">form</field>
26                         <field name="arch" type="xml">
27                                 <xpath expr="/form/notebook/page/field[@name='order_line']" position="replace">
28                                         <field name="abstract_line_ids" colspan="4" nolabel="1" widget="one2many_list">
29                                                         <form string="Sale Order Lines">
30                                                                 <notebook>
31                                         <page string="Order Line">
32                                                                                 <separator colspan="4" string="Automatic Declaration"/>
33                                                                                 <field colspan="4"
34                                                                 context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
35                                                                 name="product_id"
36                                                                 attrs="{'readonly':[('layout_type','!=','article')]}"
37                                                                 on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], True, parent.date_order, product_packaging, parent.fiscal_position)"
38                                                                 select="1"/>
39                                                             <field
40                                                                 context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
41                                                                 name="product_uom_qty"
42                                                                 attrs="{'readonly':[('layout_type','!=','article')]}"
43                                                                 on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], False, parent.date_order, product_packaging, parent.fiscal_position)"
44                                                                 select="1"/>
45                                                             <field name="product_uom"
46                                                                          required="0"
47                                                                 attrs="{'readonly':[('layout_type','!=','article')],  'required':[('layout_type','not in',['title','text','subtotal','line','break'])]}"
48                                                                 on_change="product_uom_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], False, parent.date_order)"/>
49                                                             <field
50                                                                 name="product_packaging"
51                                                                 attrs="{'readonly':[('layout_type','!=','article')]}"
52                                                                 context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
53                                                                 on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], False, parent.date_order, product_packaging, parent.fiscal_position)"
54                                                                 domain="[('product_id','=',product_id)]"
55                                                                 groups="base.group_extended"/>
56                                                             <separator colspan="4" string="Manual Description" />
57                                                             <field name="layout_type" on_change="onchange_sale_order_line_view(layout_type)"/>
58                                                             <field name="sequence" string="Seq."/>
59                                                             <field colspan="4" name="name" select="2" attrs="{'readonly':[('layout_type','in',('line','break'))] }"/>
60                                                             <field name="price_unit" select="2" attrs="{'readonly':[('layout_type','!=','article')],'required':[('layout_type','not in',['title','text','subtotal','line','break'])]}"/>
61                                                             <field name="discount" attrs="{'readonly':[('layout_type','!=','article')]}"/>
62                                                             <field name="type" attrs="{'readonly':[('layout_type','!=','article')]}"/>
63                                                             <field name="delay" select="2" attrs="{'readonly':[('layout_type','!=','article')]}"/>
64                                                             <field colspan="4" name="tax_id" domain="[('parent_id','=',False)]" attrs="{'readonly':[('layout_type','!=','article')]}"/>
65                                                             <separator colspan="4" string="States"/>
66                                         <field name="state" select="2"/>
67                                         <group col="3" colspan="2">
68                                             <field name="invoiced" select="2"/>
69                                             <button colspan="1" name="%(sale.action_view_sale_order_line_make_invoice)d" states="confirmed" string="Make Invoice" type="action"/>
70                                         </group>
71                                     </page>
72                                     <page groups="base.group_extended" string="Extra Info">
73                                                                                 <field groups="product.group_uos" name="product_uos_qty" on_change="uos_change(product_uos, product_uos_qty, product_id)"/>
74                                                                                 <field groups="product.group_uos" name="product_uos"/>
75                                                                                 <field name="address_allotment_id" select="2"/>
76                                                                                 <separator colspan="4" string="Properties"/>
77                                                                                 <field colspan="4" name="property_ids" nolabel="1"/>
78                                     </page>
79                                     <page string="Notes">
80                                         <field colspan="4" name="notes" nolabel="1"/>
81                                     </page>
82                                     <page string="History" groups="base.group_extended">
83                                         <separator colspan="4" string="Invoice Lines"/>
84                                         <field colspan="4" name="invoice_lines" nolabel="1"/>
85                                         <separator colspan="4" string="Stock Moves"/>
86                                         <field colspan="4" name="move_ids" nolabel="1" widget="many2many"/>
87                                     </page>
88                                 </notebook>
89                                                         </form>
90                                                         <tree string="Sales order lines">
91                                     <field colspan="4" name="name"/>
92                                     <field name="product_uom_qty" string="Qty"/>
93                                     <field name="product_uom" string="UoM"/>
94                                     <field name="discount"/>
95                                     <field name="price_unit"/>
96                                     <!-- field name="price_net"/-->
97                                     <field name="price_subtotal"/>
98                                     <field name="sequence"/>
99                                 </tree>
100                                         </field>
101                                 </xpath>
102                         </field>
103                 </record>
104
105         </data>
106 </openerp>