mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
packaging_extended: to use uom in packaging purchase_packaging: to improve supplierinfo with purchase uom and packaging and use them in purchase order sale_packaging: to use packaging uom in sale order line
55 lines
3.1 KiB
XML
55 lines
3.1 KiB
XML
<?xml version="1.0"?>
|
|
<openerp>
|
|
<data>
|
|
|
|
<record id="purchase_order_view_form_inherit_purchase_packaging" model="ir.ui.view">
|
|
<field name="name">purchase.order.form (purchase_packaging)</field>
|
|
<field name="model">purchase.order</field>
|
|
<field name="inherit_id" ref="purchase.purchase_order_form"/>
|
|
<field name="arch" type="xml">
|
|
<data>
|
|
<xpath expr="//page[@string='Products']//field[@name='order_line']/tree[@string='Purchase Order Lines']/field[@name='product_id']" position="after">
|
|
<field name="product_tmpl_id" invisible="1"/>
|
|
<field name="packaging_id" domain="[('product_tmpl_id','=',product_tmpl_id)]" groups="product.group_stock_packaging"/>
|
|
</xpath>
|
|
<xpath expr="//page[@string='Products']//field[@name='order_line']/tree[@string='Purchase Order Lines']/field[@name='product_qty']" position="attributes">
|
|
<attribute name="readonly">1</attribute>
|
|
</xpath>
|
|
<xpath expr="//page[@string='Products']//field[@name='order_line']/tree[@string='Purchase Order Lines']/field[@name='product_qty']" position="before">
|
|
<field name="product_purchase_qty"/>
|
|
<field name="product_purchase_uom_id" groups="product.group_uom"/>
|
|
</xpath>
|
|
<xpath expr="//page[@string='Products']//field[@name='order_line']/tree[@string='Purchase Order Lines']/field[@name='product_uom']" position="attributes">
|
|
<attribute name="attrs">{'readonly' : [('packaging_id', '!=', False)]}</attribute>
|
|
</xpath>
|
|
</data>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="purchase_order_line_view_form_inherit_purchase_packaging" model="ir.ui.view">
|
|
<field name="name">purchase.order.line.form (purchase_packaging)</field>
|
|
<field name="model">purchase.order.line</field>
|
|
<field name="inherit_id" ref="purchase.purchase_order_line_form"/>
|
|
<field name="arch" type="xml">
|
|
<data>
|
|
<field name="product_id" postion="after">
|
|
<field name="product_tmpl_id" invisible="1"/>
|
|
<field name="packaging_id" domain="[('product_tmpl_id','=',product_tmpl_id)]" groups="product.group_stock_packaging"/>
|
|
</field>
|
|
<field name="product_qty" position="attributes">
|
|
<attribute name="readonly">1</attribute>
|
|
</field>
|
|
<label for="product_qty" position="before">
|
|
<field name="product_purchase_qty"/>
|
|
<field name="product_purchase_uom_id" groups="product.group_uom"/>
|
|
<field name="product_uom" position="attributes">
|
|
<attribute name="attrs">{'readonly' : [('packaging_id', '!=', False)]}</attribute>
|
|
</field>
|
|
</label>
|
|
</data>
|
|
</field>
|
|
</record>
|
|
|
|
</data>
|
|
</openerp>
|