[FIX] Account tax

bzr revid: mra@mra-laptop-20101008053500-dig729ksvzd997ju
This commit is contained in:
Mustufa Rangwala 2010-10-08 11:05:00 +05:30
parent cf0cddde12
commit 0a97edf8b3
1 changed files with 2 additions and 2 deletions

View File

@ -1893,9 +1893,9 @@ class account_tax(osv.osv):
total = 0.0
for r in res:
if r.get('balance',False):
r['amount'] = round(r['balance'] * quantity, self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')) - total
r['amount'] = round(r.get('balance', 0.0) * quantity, self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')) - total
else:
r['amount'] = round(r['amount'] * quantity, self.pool.get('decimal.precision').precision_get(cr, uid, 'Account'))
r['amount'] = round(r.get('amount', 0.0) * quantity, self.pool.get('decimal.precision').precision_get(cr, uid, 'Account'))
total += r['amount']
return res