From 2f50767e075e786b13a5862cc8aec5c62d6534c5 Mon Sep 17 00:00:00 2001 From: qdp Date: Wed, 27 Aug 2008 16:15:58 +0200 Subject: [PATCH] *bugfix: the second screen of the pay invoice wizard was called wrongly bzr revid: qdp@tinyerp.com-20080827141558-cs1l74u3bt5risuh --- addons/account/wizard/wizard_pay_invoice.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/account/wizard/wizard_pay_invoice.py b/addons/account/wizard/wizard_pay_invoice.py index 3503070ee21..44e4fdd065c 100644 --- a/addons/account/wizard/wizard_pay_invoice.py +++ b/addons/account/wizard/wizard_pay_invoice.py @@ -87,7 +87,9 @@ def _wo_check(self, cr, uid, data, context): pool = pooler.get_pool(cr.dbname) invoice = pool.get('account.invoice').browse(cr, uid, data['id'], context) journal = pool.get('account.journal').browse(cr, uid, data['form']['journal_id'], context) - if invoice.company_id.currency_id.id<>journal.currency.id or journal.currency.id <> invoice.currency_id.id: + if invoice.company_id.currency_id.id <> invoice.currency_id.id: + return 'addendum' + if journal.currency and (journal.currency.id <> invoice.currency_id.id): return 'addendum' if pool.get('res.currency').is_zero(cr, uid, invoice.currency_id, (data['form']['amount'] - invoice.amount_total)):