From 9805de2cfbebcbe7d7387413b485664b3fd085b4 Mon Sep 17 00:00:00 2001 From: "psi (Open ERP)" Date: Thu, 13 Jan 2011 16:03:56 +0530 Subject: [PATCH] [FIX] account_voucher: improve code for Payment Invoice will set journal depending the currency in Invoice bzr revid: psi@tinyerp.co.in-20110113103356-6w3j7lrcmmev0p7q --- addons/account_voucher/account_voucher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 2e8536b1097..66be989b22c 100755 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -47,7 +47,7 @@ class account_voucher(osv.osv): journal_pool = self.pool.get('account.journal') invoice_pool = self.pool.get('account.invoice') if context.get('invoice_id', False): - currency_id = invoice_pool.browse(cr, uid, context.get('invoice_id'), context=context).currency_id.id + currency_id = invoice_pool.browse(cr, uid, context['invoice_id'], context=context).currency_id.id journal_id = journal_pool.search(cr, uid, [('currency', '=', currency_id)], limit=1) return journal_id and journal_id[0] or False if context.get('journal_id', False):