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