From b78aba3d9c3c2b373b7e58d62e64d76a6ae35325 Mon Sep 17 00:00:00 2001 From: "psi (Open ERP)" Date: Thu, 16 Dec 2010 16:01:37 +0530 Subject: [PATCH] [FIX] account_voucher: voucher validates with price include in tax lp bug: https://launchpad.net/bugs/686508 fixed bzr revid: psi@tinyerp.co.in-20101216103137-ydleoud0le7wsg2w --- addons/account_voucher/account_voucher.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 159de686764..8b14823449e 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -168,7 +168,7 @@ class account_voucher(osv.osv): debit += l.amount for l in voucher.line_cr_ids: credit += l.amount - res[voucher.id] = abs(voucher.amount - abs(credit - debit)) + res[voucher.id] = abs(voucher.amount - abs(credit - debit)) return res _name = 'account.voucher' @@ -691,7 +691,7 @@ class account_voucher(osv.osv): for line in inv.line_ids: if not line.amount: continue - amount = currency_pool.compute(cr, uid, current_currency, company_currency, line.amount) + amount = currency_pool.compute(cr, uid, current_currency, company_currency, line.untax_amount or line.amount) move_line = { 'journal_id': inv.journal_id.id, 'period_id': inv.period_id.id,