From 959fcc97c0c05c88b27bd043be137814bb8d244b Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Fri, 1 Oct 2010 16:14:50 +0200 Subject: [PATCH] [IMP] product: 'product_pricelist' report now uses decimal.precision bzr revid: olt@tinyerp.com-20101001141450-1kciqsb1gy77dwsf --- addons/product/report/product_pricelist.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/product/report/product_pricelist.py b/addons/product/report/product_pricelist.py index 613de646fe0..1148718668b 100644 --- a/addons/product/report/product_pricelist.py +++ b/addons/product/report/product_pricelist.py @@ -112,13 +112,14 @@ class product_pricelist(report_sxw.rml_parse): return res def _get_price(self,pricelist_id, product_id,qty): + sale_price_digits = self.get_digits(dp='Sale Price') pool = pooler.get_pool(self.cr.dbname) price_dict = pool.get('product.pricelist').price_get(self.cr, self.uid, [pricelist_id], product_id,qty) if price_dict[pricelist_id]: - price = self.formatLang(price_dict[pricelist_id]) + price = self.formatLang(price_dict[pricelist_id], digits=sale_price_digits) else: res = pool.get('product.product').read(self.cr, self.uid, [product_id]) - price = self.formatLang(res[0]['list_price']) + price = self.formatLang(res[0]['list_price'], digits=sale_price_digits) return price report_sxw.report_sxw('report.product.pricelist','product.product','addons/product/report/product_pricelist.rml',parser=product_pricelist)