From 78f00700e37ae06e02e948d747b4a2cb5868df45 Mon Sep 17 00:00:00 2001 From: Jeremy Kersten Date: Mon, 25 Jul 2016 17:31:30 +0200 Subject: [PATCH] [FIX] product: keep precision in historized cost field. Now we use the same decimal precision for cost in table 'Historization cost' and 'product'. It is one fix, but that will not fix the case where decimal precision has been updated between 2 historizations. This commit closes #12861 --- addons/product/product.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/product/product.py b/addons/product/product.py index 9bd497cc8c8..b478297e560 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -324,7 +324,7 @@ class produce_price_history(osv.osv): 'company_id': fields.many2one('res.company', required=True), 'product_template_id': fields.many2one('product.template', 'Product Template', required=True, ondelete='cascade'), 'datetime': fields.datetime('Historization Time'), - 'cost': fields.float('Historized Cost'), + 'cost': fields.float('Historized Cost', digits_compute=dp.get_precision('Product Price')), } def _get_default_company(self, cr, uid, context=None):