[IMP] product: uom on product packaging
If the 'Unit of Measure' setting is enable. We would like to see the product uom on on the product packaging.
This commit is contained in:
committed by
Simon Lejeune
parent
86ff929ad6
commit
da00534e5b
@@ -593,6 +593,7 @@ class ProductPackaging(models.Model):
|
||||
product_id = fields.Many2one('product.product', string='Product')
|
||||
qty = fields.Float('Contained Quantity', help="The total number of products you can have per pallet or box.")
|
||||
barcode = fields.Char('Barcode', copy=False, help="Barcode used for packaging identification.")
|
||||
product_uom_id = fields.Many2one('uom.uom', related='product_id.uom_id')
|
||||
|
||||
|
||||
class SupplierInfo(models.Model):
|
||||
|
||||
@@ -478,6 +478,7 @@
|
||||
<field name="product_id"/>
|
||||
<field name="name" string="Packaging"/>
|
||||
<field name="qty"/>
|
||||
<field name="product_uom_id" options="{'no_open': True, 'no_create': True}" groups="uom.group_uom"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -509,7 +510,11 @@
|
||||
<field name="product_id" required='True' attrs="{'readonly': [('id', '!=', False)]}"/>
|
||||
</group>
|
||||
<group name="qty">
|
||||
<field name="qty"/>
|
||||
<label for="qty" string="Contained quantity"/>
|
||||
<div class="o_row">
|
||||
<field name="qty"/>
|
||||
<field name="product_uom_id" options="{'no_open': True, 'no_create': True}" groups="uom.group_uom"/>
|
||||
</div>
|
||||
<field name="barcode"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
Reference in New Issue
Block a user