<record id="sale.action_order_line_tree2" model="ir.actions.act_window">
<field name="domain">[('layout_type','=', 'article')]</field>
</record>
- <record model="ir.ui.view" id="view_order_line_form2_inherit_1">
- <field name="name">sale.order.line.form2.inherit_1</field>
- <field name="model">sale.order.line</field>
- <field name="inherit_id" ref="sale.view_order_line_form2"/>
- <field name="type">form</field>
- <field name="arch" type="xml">
- <xpath expr="/form/group/field[@name='name']" position="before">
- <field name="layout_type" select="1" on_change="onchange_sale_order_line_view(layout_type)" />
- <field name="sequence"/>
- </xpath>
- </field>
- </record>
- <record model="ir.ui.view" id="view_order_form_inherit_1">
- <field name="name">sale.order.form.inherit_1</field>
- <field name="model">sale.order</field>
- <field name="inherit_id" ref="sale.view_order_form"/>
- <field name="priority">30</field>
- <field name="type">form</field>
- <field name="arch" type="xml">
- <xpath expr="/form/notebook/page/field[@name='order_line']" position="replace">
- <field name="abstract_line_ids" colspan="4" nolabel="1" widget="one2many_list">
- <form string="Sale Order Lines">
- <notebook>
- <page string="Order Line">
- <separator colspan="4" string="Automatic Declaration"/>
- <field colspan="4"
- context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
- name="product_id"
- attrs="{'readonly':[('layout_type','!=','article')]}"
- 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)"
- select="1"/>
- <field
- context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
- name="product_uom_qty"
- attrs="{'readonly':[('layout_type','!=','article')]}"
- 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)"
- select="1"/>
- <field name="product_uom"
- required="0"
- attrs="{'readonly':[('layout_type','!=','article')], 'required':[('layout_type','not in',['title','text','subtotal','line','break'])]}"
- 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)"/>
- <field
- name="product_packaging"
- attrs="{'readonly':[('layout_type','!=','article')]}"
- context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
- 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)"
- domain="[('product_id','=',product_id)]"
- groups="base.group_extended"/>
- <separator colspan="4" string="Manual Description" />
- <field name="layout_type" on_change="onchange_sale_order_line_view(layout_type)"/>
- <field name="sequence" string="Seq."/>
- <field colspan="4" name="name" select="2" attrs="{'readonly':[('layout_type','in',('line','break'))] }"/>
- <field name="price_unit" select="2" attrs="{'readonly':[('layout_type','!=','article')],'required':[('layout_type','not in',['title','text','subtotal','line','break'])]}"/>
- <field name="discount" attrs="{'readonly':[('layout_type','!=','article')]}"/>
- <field name="type" attrs="{'readonly':[('layout_type','!=','article')]}"/>
- <field name="delay" select="2" attrs="{'readonly':[('layout_type','!=','article')]}"/>
- <field colspan="4" name="tax_id" domain="[('parent_id','=',False)]" attrs="{'readonly':[('layout_type','!=','article')]}"/>
- <separator colspan="4" string="States"/>
- <field name="state" select="2"/>
- <group col="3" colspan="2">
- <field name="invoiced" select="2"/>
+ <record model="ir.ui.view" id="view_order_form_inherit_1">
+ <field name="name">sale.order.form.inherit_1</field>
+ <field name="model">sale.order</field>
+ <field name="inherit_id" ref="sale.view_order_form"/>
+ <field name="priority">1000</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <xpath expr="/form/notebook/page/field[@name='order_line']" position="replace">
+ <field name="abstract_line_ids" colspan="4" nolabel="1" widget="one2many_list">
+ <form string="Order Line">
+ <notebook>
+ <page string="Order Line">
+ <group colspan="4" col="5">
+ <field colspan="3" name="layout_type" on_change="onchange_sale_order_line_view(layout_type)"/>
+ <field name="sequence" groups="base.group_extended"/>
+ <field colspan="3"
+ context="{'partner_id':parent.partner_id,'quantity':product_uom_qty,'pricelist':parent.pricelist_id,'shop':parent.shop_id,'uom':product_uom}"
+ name="product_id"
+ attrs="{'invisible':[('layout_type','!=','article')]}"
+ 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)"
+ select="1"/>
+ <field
+ name="name" required="0"
+ attrs="{'invisible':[('layout_type','in',('line','break','subtotal'))], 'required':[('layout_type','not in',['line','break'])]}"/>
+
+ <field
+ context="{'partner_id':parent.partner_id,'quantity':product_uom_qty,'pricelist':parent.pricelist_id,'shop':parent.shop_id,'uom':product_uom}"
+ name="product_uom_qty"
+ attrs="{'invisible':[('layout_type','!=','article')]}"
+ 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)"/>
+ <field name="product_uom"
+ nolabel="1"
+ required="0"
+ attrs="{'invisible':[('layout_type','!=','article')], 'required':[('layout_type','not in',['title','text','subtotal','line','break'])]}"
+ 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)"/>
+ <field name="price_unit"
+ attrs="{'invisible':[('layout_type','!=','article')],'required':[('layout_type','not in',['title','text','subtotal','line','break'])]}"/>
+
+ <field groups="product.group_uos" name="product_uos_qty" on_change="uos_change(product_uos, product_uos_qty, product_id)"/>
+ <field groups="product.group_uos" name="product_uos" nolabel="1"/>
+ <newline/>
+
+ <field
+ name="product_packaging"
+ colspan="3"
+ attrs="{'invisible':[('layout_type','!=','article')]}"
+ context="{'partner_id':parent.partner_id,'quantity':product_uom_qty,'pricelist':parent.pricelist_id,'shop':parent.shop_id,'uom':product_uom}"
+ on_change="product_packaging_change(parent.pricelist_id, product_id, product_uom_qty, product_uom, parent.partner_id, product_packaging, True, context)"
+ domain="[('product_id','=',product_id)]"
+ groups="base.group_extended"/>
+ <field
+ name="discount"
+ attrs="{'invisible':[('layout_type','!=','article')]}"/>
+
+ <group colspan="5"
+ attrs="{'invisible':[('layout_type','not in', ['article','text'])]}">
+ <separator colspan="4" string="Notes"/>
+ <field colspan="4" name="notes" nolabel="1"/>
+ </group>
+
+ <group colspan="5"
+ attrs="{'invisible':[('layout_type','!=','article')]}">
+ <separator colspan="4" string="Taxes"/>
+ <field colspan="4" name="tax_id" domain="[('parent_id','=',False)]" nolabel="1"/>
+ </group>
+
+ <group col="5" colspan="5" attrs="{'invisible':[('layout_type','!=','article')]}">
+ <separator colspan="5" string="States"/>
+ <field name="state"/>
+ <field name="invoiced"/>
<button colspan="1" name="%(sale.action_view_sale_order_line_make_invoice)d" states="confirmed" string="Make Invoice" type="action"/>
</group>
+ </group>
</page>
- <page groups="base.group_extended" string="Extra Info">
- <field groups="product.group_uos" name="product_uos_qty" on_change="uos_change(product_uos, product_uos_qty, product_id)"/>
- <field groups="product.group_uos" name="product_uos"/>
- <field name="address_allotment_id" select="2"/>
- <separator colspan="4" string="Properties"/>
- <field colspan="4" name="property_ids" nolabel="1"/>
- </page>
- <page string="Notes">
- <field colspan="4" name="notes" nolabel="1"/>
+ <page groups="base.group_extended" string="Extra Info"
+ attrs="{'invisible':[('layout_type','!=','article')]}">
+ <field name="type" attrs="{'invisible':[('layout_type','!=','article')]}"/>
+ <field name="delay" select="2" attrs="{'invisible':[('layout_type','!=','article')]}"/>
+ <field name="address_allotment_id" select="2"/>
+ <separator colspan="4" string="Properties"/>
+ <field colspan="4" name="property_ids" nolabel="1"/>
</page>
- <page string="History" groups="base.group_extended">
+ <page string="History" groups="base.group_extended"
+ attrs="{'invisible':[('layout_type','!=','article')]}">
<separator colspan="4" string="Invoice Lines"/>
<field colspan="4" name="invoice_lines" nolabel="1"/>
<separator colspan="4" string="Stock Moves"/>
<field colspan="4" name="move_ids" nolabel="1" widget="many2many"/>
</page>
</notebook>
- </form>
- <tree string="Sales order lines">
+ </form>
+ <tree string="Sales order lines">
<field colspan="4" name="name"/>
<field name="product_uom_qty" string="Qty"/>
<field name="product_uom" string="UoM"/>
<field name="price_subtotal"/>
<field name="sequence"/>
</tree>
- </field>
- </xpath>
- </field>
- </record>
+ </field>
+ </xpath>
+ </field>
+ </record>
- </data>
+ </data>
</openerp>