lp bug: https://launchpad.net/bugs/513278 fixed
lp bug: https://launchpad.net/bugs/452854 fixed
bzr revid: odo@openerp.com-
20100423131744-wx2fvl217v5d1rpe
if currency.rounding == 0:
return 0.0
else:
- return round(amount / currency.rounding,6) * currency.rounding
+ # /!\ First member below must be rounded to full unit!
+ # Do not pass a rounding digits value to round()
+ return round(amount / currency.rounding) * currency.rounding
def is_zero(self, cr, uid, currency, amount):
return abs(self.round(cr, uid, currency, amount)) < currency.rounding