From 3cae2c51555f931d8a27ef83483fc386e33b10cb Mon Sep 17 00:00:00 2001 From: Rifakathusen Haradwala Date: Fri, 5 Sep 2014 17:36:52 +0530 Subject: [PATCH] [FIX] account: wrong tax amount for manual tax line On an invoice, tax lines are generated in tax_line field. When modifying manually the tax amount, the recomputed tax_amount field was incorrect in multicurrency environment, leading to an entry with different tax amount and debit value. opw 611474 --- addons/account/account_invoice.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index f90c9661c09..7b5d8b818a0 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -1696,13 +1696,10 @@ class account_invoice_tax(osv.osv): cur_obj = self.pool.get('res.currency') company_obj = self.pool.get('res.company') company_currency = False - factor = 1 - if ids: - factor = self.read(cr, uid, ids[0], ['factor_tax'])['factor_tax'] if company_id: company_currency = company_obj.read(cr, uid, [company_id], ['currency_id'])[0]['currency_id'][0] if currency_id and company_currency: - amount = cur_obj.compute(cr, uid, currency_id, company_currency, amount*factor, context={'date': date_invoice or fields.date.context_today(self, cr, uid)}, round=False) + amount = cur_obj.compute(cr, uid, currency_id, company_currency, amount, context={'date': date_invoice or fields.date.context_today(self, cr, uid)}, round=False) return {'value': {'tax_amount': amount}} _order = 'sequence'