[FIX]account_voucher : improved some code

bzr revid: mma@tinyerp.com-20121105072021-236ci5s510fx5deq
This commit is contained in:
Mayur Maheshwari (OpenERP) 2012-11-05 12:50:21 +05:30
parent 7637a134e2
commit fd8f46b39a
1 changed files with 3 additions and 3 deletions

View File

@ -384,7 +384,7 @@ class account_voucher(osv.osv):
for line in voucher.line_ids:
for tax_line in tax_pool.compute_all(cr, uid, tax, line.amount, 1).get('taxes', []):
total_tax += tax_line.get('amount', 0.0)
total += total_tax
total += total_tax
else:
for line in voucher.line_ids:
line_total = 0.0
@ -427,9 +427,9 @@ class account_voucher(osv.osv):
tax = tax_pool.browse(cr, uid, taxes, context=context)
if not tax[0].price_include:
for tax_line in tax_pool.compute_all(cr, uid, tax, voucher_total, 1).get('taxes', []):
for tax_line in tax_pool.compute_all(cr, uid, tax, line_amount, 1).get('taxes', []):
total_tax += tax_line.get('amount')
total += total_tax
voucher_total += line_amount
total = voucher_total + total_tax