From 1ff4d0c9a1185de2eca13fe3d3434ea256ef8008 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Fri, 19 Dec 2014 11:51:22 +0100 Subject: [PATCH] [FIX] product: variants prices (extra price) digits precision When adding an extra price for a variant (through the button variant prices in the product template form) with a digits precision greater than 2 (4 for instance), the computed public price did not keep the digits precision of the extra price --- 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 618d1503afc..a5eee93b0e3 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -930,7 +930,7 @@ class product_product(osv.osv): _columns = { 'price': fields.function(_product_price, type='float', string='Price', digits_compute=dp.get_precision('Product Price')), - 'price_extra': fields.function(_get_price_extra, type='float', string='Variant Extra Price', help="This is the sum of the extra price of all attributes"), + 'price_extra': fields.function(_get_price_extra, type='float', string='Variant Extra Price', help="This is the sum of the extra price of all attributes", digits_compute=dp.get_precision('Product Price')), 'lst_price': fields.function(_product_lst_price, fnct_inv=_set_product_lst_price, type='float', string='Public Price', digits_compute=dp.get_precision('Product Price')), 'code': fields.function(_product_code, type='char', string='Internal Reference'), 'partner_ref' : fields.function(_product_partner_ref, type='char', string='Customer ref'),