[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
This commit is contained in:
parent
e9228e2c5a
commit
1a5d2e77c4
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue