diff options
| author | William Henrotin <whe@odoo.com> | 2018-09-18 16:23:33 +0200 |
|---|---|---|
| committer | William Henrotin <whe@odoo.com> | 2018-09-18 16:29:07 +0200 |
| commit | 96143348ae1fd50fec7c944b8034633afc31dcbd (patch) | |
| tree | 60de75a1ae1d844eb281cb2b03986d39703b06d1 | |
| parent | e2c28ed3d624874a4f82a6c378cb2ed7b8c6c46c (diff) | |
[FIX] product: lock uom in edition
On product packaging model, the uom is related to the product uom but
but editable. This can lead to some error in the database. This commit
set it as readonly to avoid any mistake.
Co-authored-by: Denis Roussel <denis.roussel@acsone.eu>
| -rw-r--r-- | addons/product/models/product.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/product/models/product.py b/addons/product/models/product.py index aafc17190a5..12ddf1d9734 100644 --- a/addons/product/models/product.py +++ b/addons/product/models/product.py @@ -593,7 +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') + product_uom_id = fields.Many2one('uom.uom', related='product_id.uom_id', readonly=True) class SupplierInfo(models.Model): |
