From 7c330b4443043dede13f76c034e2a2c5e53cbdee Mon Sep 17 00:00:00 2001 From: William Henrotin <whe@odoo.com> Date: Wed, 27 Nov 2019 15:35:00 +0000 Subject: [PATCH] [IMP] stock: track changes on type Changing a product type from consumable to storable and and vice versa can make the quantity in stock confusing. As only storable product update the stock quants, the amount on stock moves could be diffenrent that the one on stock quant if the product type has been changed in the past. This commit will make those changes saved in the chatter history in order to easily track inconsistencies closes odoo/odoo#40933 Opw: 2125124 X-original-commit: 7f07d07c3559cb2885a192fa2210d9673612c246 Signed-off-by: Simon Lejeune (sle) <sle@openerp.com> --- addons/stock/models/product.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/models/product.py b/addons/stock/models/product.py index 0b74e538af15..9f4cae5dbbac 100644 --- a/addons/stock/models/product.py +++ b/addons/stock/models/product.py @@ -429,7 +429,7 @@ class ProductTemplate(models.Model): responsible_id = fields.Many2one( 'res.users', string='Responsible', default=lambda self: self.env.uid, required=True, help="This user will be responsible of the next activities related to logistic operations for this product.") - type = fields.Selection(selection_add=[('product', 'Storable Product')]) + type = fields.Selection(selection_add=[('product', 'Storable Product')], track_visibility='onchange') property_stock_production = fields.Many2one( 'stock.location', "Production Location", company_dependent=True, domain=[('usage', 'like', 'production')], -- GitLab