From da08afac8f6a5d262981db465b848b2880794b3c Mon Sep 17 00:00:00 2001 From: ced <> Date: Fri, 23 Feb 2007 07:37:26 +0000 Subject: [PATCH] ACCOUNT: fix call to account.tax.compute bzr revid: ced-40eb7f3cc03ade7084d677dc37a3ebac21c47e4a --- addons/account/account_move_line.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index e02e6680162..9c0fd306c32 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -99,14 +99,13 @@ class account_move_line(osv.osv): if not taxes[t] and t[0]: s=0 for l in move.line_id: - taxes = self.pool.get('account.tax').compute(cr, uid, l.account_id.tax_ids, l.debit or l.credit, 1, False) key = (l.debit and 'account_paid_id') or 'account_collected_id' - for t2 in taxes: - if (t2[key] == t[0]) and (t2['tax_code_id']==t[1]): + for tax in self.pool.get('account.tax').compute(cr, uid, l.account_id.tax_ids, l.debit or l.credit, 1, False): + if (tax[key] == t[0]) and (tax['tax_code_id']==t[1]): if l.debit: - s += t2['amount'] + s += tax['amount'] else: - s -= t2['amount'] + s -= tax['amount'] data['debit'] = s>0 and s or 0.0 data['credit'] = s<0 and -s or 0.0