summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Ledoux <dle@openerp.com>2014-03-12 13:09:04 +0100
committerDenis Ledoux <dle@openerp.com>2014-03-12 13:09:04 +0100
commit1a5d2e77c48c3f923bbbc44cd97b2fef341709d7 (patch)
tree9f4c30239c1c6dc900afe1860dd74d9eec34c85e
parente9228e2c5a16c3adfb5392d8d8a0469e3814c43b (diff)
[FIX] account: using float_round instead of native python round method, to apply half-up tie-breaking rule (1.655 with precision 2 is now 1.66 instead of 1.65).
bzr revid: dle@openerp.com-20140312120904-ucixsl1szfi1q0ea
-rw-r--r--addons/account/account.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/account/account.py b/addons/account/account.py
index 4ccdac59ee8..c45c337f019 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -30,7 +30,7 @@ from openerp import SUPERUSER_ID
from openerp import pooler, tools
from openerp.osv import fields, osv, expression
from openerp.tools.translate import _
-from openerp.tools.float_utils import float_round
+from openerp.tools.float_utils import float_round as round
import openerp.addons.decimal_precision as dp
@@ -2155,7 +2155,7 @@ class account_tax(osv.osv):
tax_compute_precision = precision
if taxes and taxes[0].company_id.tax_calculation_rounding_method == 'round_globally':
tax_compute_precision += 5
- totalin = totalex = float_round(price_unit * quantity, precision)
+ totalin = totalex = round(price_unit * quantity, precision)
tin = []
tex = []
for tax in taxes: