[FIX] point_of_sale: use the correct rounding method for computing taxes
bzr revid: fva@openerp.com-20130409160021-707f3vrxcrqytsl6
This commit is contained in:
parent
c176e1e7ca
commit
b2a872846c
|
@ -909,6 +909,7 @@ class pos_order(osv.osv):
|
|||
account_tax_obj = self.pool.get('account.tax')
|
||||
user_proxy = self.pool.get('res.users')
|
||||
property_obj = self.pool.get('ir.property')
|
||||
cur_obj = self.pool.get('res.currency')
|
||||
|
||||
period = account_period_obj.find(cr, uid, context=context)[0]
|
||||
|
||||
|
@ -1010,11 +1011,11 @@ class pos_order(osv.osv):
|
|||
computed_taxes = account_tax_obj.compute_all(cr, uid, taxes, line.price_unit * (100.0-line.discount) / 100.0, line.qty)['taxes']
|
||||
|
||||
for tax in computed_taxes:
|
||||
tax_amount += round(tax['amount'], 2)
|
||||
tax_amount += cur_obj.round(cr, uid, cur, tax['amount'])
|
||||
group_key = (tax['tax_code_id'], tax['base_code_id'], tax['account_collected_id'], tax['id'])
|
||||
|
||||
group_tax.setdefault(group_key, 0)
|
||||
group_tax[group_key] += round(tax['amount'], 2)
|
||||
group_tax[group_key] += cur_obj.round(cr, uid, cur, tax['amount'])
|
||||
|
||||
amount = line.price_subtotal
|
||||
|
||||
|
|
Loading…
Reference in New Issue