[FIX] stock: product_packaging field domain should look for product template
This commit is contained in:
parent
5843a12f26
commit
87e509ad8c
|
@ -1712,6 +1712,7 @@ class stock_move(osv.osv):
|
|||
'product_uom': fields.many2one('product.uom', 'Unit of Measure', required=True, states={'done': [('readonly', True)]}),
|
||||
'product_uos_qty': fields.float('Quantity (UOS)', digits_compute=dp.get_precision('Product Unit of Measure'), states={'done': [('readonly', True)]}),
|
||||
'product_uos': fields.many2one('product.uom', 'Product UOS', states={'done': [('readonly', True)]}),
|
||||
'product_tmpl_id': fields.related('product_id', 'product_tmpl_id', type='many2one', relation='product.template', string='Product Template'),
|
||||
|
||||
'product_packaging': fields.many2one('product.packaging', 'Prefered Packaging', help="It specifies attributes of packaging like type, quantity of packaging,etc."),
|
||||
|
||||
|
|
|
@ -287,7 +287,7 @@
|
|||
<field name="product_id"/>
|
||||
<field name="product_uom_qty"/>
|
||||
<field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="product_packaging" domain="[('product_tmpl_id','=',product_id)]" groups="product.group_stock_packaging"/>
|
||||
<field name="product_packaging" domain="[('product_tmpl_id','=',product_tmpl_id)]" groups="product.group_stock_packaging"/>
|
||||
<field name="picking_id"/>
|
||||
<field name="location_id" groups="stock.group_locations"/>
|
||||
<field name="location_dest_id" groups="stock.group_locations"/>
|
||||
|
@ -1085,7 +1085,8 @@
|
|||
<field name="product_uos" on_change="onchange_quantity(product_id, product_uom_qty, product_uom, product_uos)" class="oe_inline"/>
|
||||
</div>
|
||||
<field name="name"/>
|
||||
<field name="product_packaging" groups="product.group_stock_packaging" domain="[('product_tmpl_id','=',product_id)]"/>
|
||||
<field name="product_tmpl_id" invisible="1"/>
|
||||
<field name="product_packaging" groups="product.group_stock_packaging" domain="[('product_tmpl_id','=',product_tmpl_id)]"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="create_date" invisible="1"/>
|
||||
|
|
Loading…
Reference in New Issue