[ADD] uid field in context used when requesting a view, so modifiers processing can...
[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
8         <record model="ir.ui.view" id="view_order_form_inherit_1">
9             <field name="name">sale.order.form.inherit_1</field>
10             <field name="model">sale.order</field>
11             <field name="inherit_id" ref="sale.view_order_form"/>
12             <field name="priority">1000</field>
13             <field name="type">form</field>
14             <field name="arch" type="xml">
15                 <xpath expr="/form/notebook/page/field[@name='order_line']" position="replace">
16                     <field name="abstract_line_ids" colspan="4" nolabel="1" widget="one2many_list">
17                             <form string="Order Line">
18                                 <notebook>
19                                     <page string="Order Line">
20                                     <group colspan="4" col="5">
21                                         <field colspan="3" name="layout_type" on_change="onchange_sale_order_line_view(layout_type)"/>
22                                         <field name="sequence" groups="base.group_extended"/>
23                                         <field colspan="3"
24                                             context="{'partner_id':parent.partner_id,'quantity':product_uom_qty,'pricelist':parent.pricelist_id,'shop':parent.shop_id,'uom':product_uom}"
25                                             name="product_id"
26                                             attrs="{'invisible':[('layout_type','!=','article')]}"
27                                             on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, False, True, parent.date_order, product_packaging, parent.fiscal_position, False, context)"
28                                             select="1"/>
29                                         <field
30                                             name="name" required="0"
31                                             attrs="{'invisible':[('layout_type','in',('line','break','subtotal'))], 'required':[('layout_type','not in',['line','break'])]}"/>
32
33                                         <field
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_uom_qty"
36                                             attrs="{'invisible':[('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, False, False, parent.date_order, product_packaging, parent.fiscal_position, True, context)"/>
38                                         <field name="product_uom"
39                                             nolabel="1"
40                                             required="0"
41                                             attrs="{'invisible':[('layout_type','!=','article')],  'required':[('layout_type','not in',['title','text','subtotal','line','break'])]}"
42                                             on_change="product_uom_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, False, False, parent.date_order, context)"/>
43                                         <field name="price_unit"
44                                             attrs="{'invisible':[('layout_type','!=','article')],'required':[('layout_type','not in',['title','text','subtotal','line','break'])]}"/>
45
46                                         <field groups="product.group_uos" name="product_uos_qty" on_change="uos_change(product_uos, product_uos_qty, product_id)"/>
47                                         <field groups="product.group_uos" name="product_uos" nolabel="1"/>
48                                         <newline/>
49
50                                         <field
51                                             name="product_packaging"
52                                             colspan="3"
53                                             attrs="{'invisible':[('layout_type','!=','article')]}"
54                                             context="{'partner_id':parent.partner_id,'quantity':product_uom_qty,'pricelist':parent.pricelist_id,'shop':parent.shop_id,'uom':product_uom}"
55                                             on_change="product_packaging_change(parent.pricelist_id, product_id, product_uom_qty, product_uom, parent.partner_id, product_packaging, True, context)"
56                                             domain="[('product_id','=',product_id)]"
57                                             groups="base.group_extended"/>
58                                         <field
59                                             name="discount"
60                                             attrs="{'invisible':[('layout_type','!=','article')]}"/>
61
62                                         <group colspan="5"
63                                             attrs="{'invisible':[('layout_type','not in', ['article','text'])]}">
64                                             <separator colspan="4" string="Notes"/>
65                                             <field colspan="4" name="notes" nolabel="1"/>
66                                         </group>
67
68                                         <group colspan="5"
69                                             attrs="{'invisible':[('layout_type','!=','article')]}">
70                                             <separator colspan="4" string="Taxes"/>
71                                             <field colspan="4" name="tax_id" domain="[('parent_id','=',False)]" nolabel="1"/>
72                                         </group>
73
74                                         <group col="5" colspan="5" attrs="{'invisible':[('layout_type','!=','article')]}">
75                                             <separator colspan="5" string="States"/>
76                                             <field name="state"/>
77                                             <field name="invoiced"/>
78                                             <button colspan="1" name="%(sale.action_view_sale_order_line_make_invoice)d" states="confirmed" string="Make Invoice" type="action"/>
79                                         </group>
80                                     </group>
81                                     </page>
82                                     <page groups="base.group_extended" string="Extra Info"
83                                         attrs="{'invisible':[('layout_type','!=','article')]}">
84                                         <field name="type" attrs="{'invisible':[('layout_type','!=','article')]}"/>
85                                         <field name="delay" select="2" attrs="{'invisible':[('layout_type','!=','article')]}"/>
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="History" groups="base.group_extended"
91                                         attrs="{'invisible':[('layout_type','!=','article')]}">
92                                         <separator colspan="4" string="Invoice Lines"/>
93                                         <field colspan="4" name="invoice_lines" nolabel="1"/>
94                                         <separator colspan="4" string="Stock Moves"/>
95                                         <field colspan="4" name="move_ids" nolabel="1" widget="many2many"/>
96                                     </page>
97                                 </notebook>
98                             </form>
99                             <tree string="Sales order lines">
100                                     <field colspan="4" name="name"/>
101                                     <field name="product_uom_qty" string="Qty"/>
102                                     <field name="product_uom" string="UoM"/>
103                                     <field name="discount"/>
104                                     <field name="price_unit"/>
105                                     <!-- field name="price_net"/-->
106                                     <field name="price_subtotal"/>
107                                     <field name="sequence"/>
108                                 </tree>
109                     </field>
110                 </xpath>
111             </field>
112         </record>
113
114     </data>
115 </openerp>