diff options
| author | Christophe Simonis <chs@odoo.com> | 2016-07-25 14:07:50 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2016-07-25 14:07:50 +0200 |
| commit | 7df4ea5b57412bd2e8623de1701c0d75175878cb (patch) | |
| tree | 371d3b824eeaad2d3126a9fabb5e009885d2ff3e /addons/product/report | |
| parent | eff0a3b0498bac66b78a85cf5193609f196018f0 (diff) | |
| parent | 43cff22950a638a69d4f0ad0036ed034815c8f6c (diff) | |
[MERGE] forward port branch 8.0 up to 43cff22
Diffstat (limited to 'addons/product/report')
| -rw-r--r-- | addons/product/report/product_pricelist.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/addons/product/report/product_pricelist.py b/addons/product/report/product_pricelist.py index cc59621e858..f3b0933a5b3 100644 --- a/addons/product/report/product_pricelist.py +++ b/addons/product/report/product_pricelist.py @@ -22,6 +22,7 @@ import time from openerp.osv import osv from openerp.report import report_sxw +from openerp.tools import float_round class product_pricelist(report_sxw.rml_parse): @@ -106,10 +107,11 @@ class product_pricelist(report_sxw.rml_parse): pricelist = self.pool.get('product.pricelist').browse(self.cr, self.uid, [pricelist_id], context=self.localcontext)[0] price_dict = self.pool.get('product.pricelist').price_get(self.cr, self.uid, [pricelist_id], product_id, qty, context=self.localcontext) if price_dict[pricelist_id]: - price = self.formatLang(price_dict[pricelist_id], digits=sale_price_digits, currency_obj=pricelist.currency_id) + price = float_round(price_dict[pricelist_id], precision_digits=sale_price_digits) else: res = self.pool.get('product.product').read(self.cr, self.uid, [product_id]) - price = self.formatLang(res[0]['list_price'], digits=sale_price_digits, currency_obj=pricelist.currency_id) + price = float_round(res[0]['list_price'], precision_digits=sale_price_digits) + price = self.formatLang(price, digits=sale_price_digits, currency_obj=pricelist.currency_id) return price |
