From 003cfb515d901a091a2308f3fa430dc59a7c3fdb Mon Sep 17 00:00:00 2001 From: ced <> Date: Fri, 5 Oct 2007 05:24:52 +0000 Subject: [PATCH] Don't round price when compute currency bzr revid: ced-3e8ada75a1003931cd4c372858a167df39ed9043 --- addons/product/pricelist.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/addons/product/pricelist.py b/addons/product/pricelist.py index a2ddc619a69..132640787b7 100644 --- a/addons/product/pricelist.py +++ b/addons/product/pricelist.py @@ -132,7 +132,8 @@ class product_pricelist(osv.osv): else: price_tmp = self.price_get(cr, uid, [res['base_pricelist_id']], prod_id, qty)[res['base_pricelist_id']] ptype_src = self.pool.get('product.pricelist').browse(cr, uid, res['base_pricelist_id']).currency_id.id - price = currency_obj.compute(cr, uid, ptype_src, res['currency_id'], price_tmp) + price = currency_obj.compute(cr, uid, ptype_src, + res['currency_id'], price_tmp, round=False) elif res['base'] == -2: where = [] if partner: @@ -150,8 +151,11 @@ class product_pricelist(osv.osv): continue else: price_type_o=self.pool.get('product.price.type').read(cr, uid, [ res['base'] ])[0] - price = currency_obj.compute(cr, uid, price_type_o['currency_id'][0], res['currency_id'], self.pool.get('product.product').price_get(cr, uid, [prod_id], price_type_o['field'])[prod_id]) - + price = currency_obj.compute(cr, uid, + price_type_o['currency_id'][0], res['currency_id'], + product_obj.price_get(cr, uid, [prod_id], + price_type_o['field'])[prod_id], round=False) + price_limit = price price = price * (1.0-(res['price_discount'] or 0.0))