[IMP] SO form clean the mess
[odoo/odoo.git] / addons / sale_stock / sale_stock_view.xml
index 4088395..e3f0ab3 100644 (file)
                     <field name="company_id" position="replace">
                         <field name="company_id" readonly="True"/>
                     </field>
-                    <field name="client_order_ref" position="after">
-                         <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" options="{'no_create': True}" groups="stock.group_locations"/>
-                    </field>
-                   <xpath expr="//field[@name='order_line']/form//field[@name='product_id']" position="attributes">
-                       <attribute name="on_change">product_id_change_with_wh(parent.pricelist_id,product_id,product_uom_qty,False,product_uos_qty,False,name,parent.partner_id, False, True, parent.date_order, product_packaging, parent.fiscal_position, False, parent.warehouse_id, context)</attribute>
+                    <xpath expr="//group[@name='sales_person']" position="before">
+                        <group string="Shipping Information" name="sale_shipping">
+                            <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" options="{'no_create': True}" groups="stock.group_locations"/>
+                            <field name="incoterm" widget="selection" groups="base.group_user"/>
+                            <field name="picking_policy" required="True"/>
+                        </group>
+                    </xpath>
+                    <xpath expr="//field[@name='order_line']/tree//field[@name='product_id']" position="replace">
+                       <field name="product_id"
+                       context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom}"
+                       groups="base.group_user" 
+                       on_change="product_id_change_with_wh(parent.pricelist_id,product_id,product_uom_qty,False,product_uos_qty,False,name,parent.partner_id, False, True, parent.date_order, product_packaging, parent.fiscal_position, False, parent.warehouse_id, context)"/>
                    </xpath>
                    <xpath expr="//field[@name='order_line']/tree//field[@name='product_id']" position="attributes">
                        <attribute name="on_change">product_id_change_with_wh(parent.pricelist_id,product_id,product_uom_qty,False,product_uos_qty,False,name,parent.partner_id, False, True, parent.date_order, product_packaging, parent.fiscal_position, False, parent.warehouse_id, context)</attribute>
                    <xpath expr="//field[@name='order_line']/tree//field[@name='product_uom_qty']" position="attributes">
                        <attribute name="on_change">product_id_change_with_wh(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,False,name,parent.partner_id, False, False, parent.date_order, product_packaging, parent.fiscal_position, True, parent.warehouse_id, context)</attribute>
                    </xpath>
-                   <xpath expr="//field[@name='order_line']/form//field[@name='product_uos_qty']" position="attributes">
-                       <attribute name="context">{'partner_id':parent.partner_id, 'quantity':product_uos_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom}</attribute>
-                        <attribute name="on_change">product_id_change_with_wh(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, parent.warehouse_id, context)</attribute>
+                   <xpath expr="//group[@name='technical']" position="inside">
+                       <field name="shipped" groups="base.group_no_one"/>
+                       <field name="invoice_exists" invisible="1" groups="base.group_no_one"/>
                    </xpath>
-                   <xpath expr="//field[@name='order_line']/form//field[@name='product_uom_qty']" position="attributes">
-                       <attribute name="on_change">product_id_change_with_wh(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,False,name,parent.partner_id, False, False, parent.date_order, product_packaging, parent.fiscal_position, True, parent.warehouse_id, context)</attribute>
-                   </xpath>
-                   <field name='invoiced' position="after">
-                       <field name="shipped"/>
-                       <field name="invoice_exists" invisible="1"/>
-                   </field>
                    <xpath expr="//page[@string='Order Lines']/field[@name='order_line']/form[@string='Sales Order Lines']/group/group/field[@name='tax_id']" position="after">
                        <label for="delay"/>
                        <div>
                    <xpath expr="//page[@string='Order Lines']/field[@name='order_line']/tree[@string='Sales Order Lines']/field[@name='th_weight']" position="after">
                        <field name="product_packaging" invisible="1"/>
                    </xpath>
-                   <xpath expr="//group[@name='sales_person']" position="before">
-                        <group name="logistics">
-                            <field name="incoterm" widget="selection" groups="base.group_user"/>
-                            <field name="picking_policy" required="True"/>
+                   <xpath expr="//group[@name='sale_pay']" position="inside">
                             <field name="order_policy"/>
-                        </group>
-                   </xpath>
+                   </xpath>                            
                    <xpath expr="//field[@name='order_line']/form/group/group/field[@name='price_unit']" position="before">
                         <field name="route_id" groups="sale_stock.group_route_so_lines"/>
                    </xpath>