From da00534e5b7a3e569038e59cd5c6596d3bec6cba Mon Sep 17 00:00:00 2001 From: William Henrotin Date: Tue, 28 Aug 2018 14:50:37 +0200 Subject: [PATCH] [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. --- addons/product/models/product.py | 1 + addons/product/views/product_views.xml | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/addons/product/models/product.py b/addons/product/models/product.py index becbe1e7491..aafc17190a5 100644 --- a/addons/product/models/product.py +++ b/addons/product/models/product.py @@ -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): diff --git a/addons/product/views/product_views.xml b/addons/product/views/product_views.xml index 9eebf162865..fdff0b02a3c 100644 --- a/addons/product/views/product_views.xml +++ b/addons/product/views/product_views.xml @@ -478,6 +478,7 @@ + @@ -509,7 +510,11 @@ - +