[FIX] use float rounding for pricelist instead of ceiling

bzr revid: mat@openerp.com-20140306162953-iu7k53i5zsllokdp
This commit is contained in:
Martin Trigaux
2014-03-06 17:29:53 +01:00
parent 1e048736df
commit dc46ffd589
+2 -3
View File
@@ -21,8 +21,7 @@
import time
from _common import ceiling
from openerp import tools
from openerp.osv import fields, osv
from openerp.tools.translate import _
@@ -296,7 +295,7 @@ class product_pricelist(osv.osv):
if price is not False:
price_limit = price
price = price * (1.0+(res['price_discount'] or 0.0))
price = ceiling(price, res['price_round'])
price = tools.float_rouding(price, precision_rounding=res['price_round'])
price += (res['price_surcharge'] or 0.0)
if res['price_min_margin']:
price = max(price, price_limit+res['price_min_margin'])