parent
0a97edf8b3
commit
c2dd699dd3
|
@ -1891,11 +1891,12 @@ class account_tax(osv.osv):
|
|||
"""
|
||||
res = self._unit_compute(cr, uid, taxes, price_unit, address_id, product, partner, quantity)
|
||||
total = 0.0
|
||||
precision_pool = self.pool.get('decimal.precision')
|
||||
for r in res:
|
||||
if r.get('balance',False):
|
||||
r['amount'] = round(r.get('balance', 0.0) * quantity, self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')) - total
|
||||
r['amount'] = round(r.get('balance', 0.0) * quantity, precision_pool.precision_get(cr, uid, 'Account')) - total
|
||||
else:
|
||||
r['amount'] = round(r.get('amount', 0.0) * quantity, self.pool.get('decimal.precision').precision_get(cr, uid, 'Account'))
|
||||
r['amount'] = round(r.get('amount', 0.0) * quantity, precision_pool.precision_get(cr, uid, 'Account'))
|
||||
total += r['amount']
|
||||
return res
|
||||
|
||||
|
|
Loading…
Reference in New Issue