From 610e8e9a26aa7f869ed9b2d4513a74f103e442ad Mon Sep 17 00:00:00 2001 From: "Amit Bhavsar (Open ERP)" Date: Fri, 4 May 2012 12:37:55 +0530 Subject: [PATCH 1/2] [FIX] account_voucher : Fixes for the warning message lp bug: https://launchpad.net/bugs/930042 fixed bzr revid: amb@tinyerp.com-20120504070755-p2s6wjpjrrr3jplu --- 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 0191f5866ba..f60e76ae666 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -946,11 +946,11 @@ class account_voucher(osv.osv): if amount_residual > 0: account_id = line.voucher_id.company_id.expense_currency_exchange_account_id if not account_id: - raise osv.except_osv(_('Warning'),_("Unable to create accounting entry for currency rate difference. You have to configure the field 'Income Currency Rate' on the company! ")) + raise osv.except_osv(_('Warning'),_("Unable to create accounting entry for currency rate difference. You have to configure the field 'Expense Currency Rate' on the company! ")) else: account_id = line.voucher_id.company_id.income_currency_exchange_account_id if not account_id: - raise osv.except_osv(_('Warning'),_("Unable to create accounting entry for currency rate difference. You have to configure the field 'Expense Currency Rate' on the company! ")) + raise osv.except_osv(_('Warning'),_("Unable to create accounting entry for currency rate difference. You have to configure the field 'Income Currency Rate' on the company! ")) # Even if the amount_currency is never filled, we need to pass the foreign currency because otherwise # the receivable/payable account may have a secondary currency, which render this field mandatory account_currency_id = company_currency <> current_currency and current_currency or False From f77ccbd8fb074044cb0c6f380f91756e7184bfd9 Mon Sep 17 00:00:00 2001 From: "Amit Bhavsar (Open ERP)" Date: Mon, 27 Aug 2012 18:48:02 +0530 Subject: [PATCH 2/2] Merge with latest addons. bzr revid: amb@tinyerp.com-20120827131802-zyty9axhyfbgv3hv --- addons/account_voucher/account_voucher.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 680c028c89b..1c2ba8a0bc0 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -950,13 +950,11 @@ class account_voucher(osv.osv): if amount_residual > 0: account_id = line.voucher_id.company_id.expense_currency_exchange_account_id if not account_id: - raise osv.except_osv(_('Warning'),_("Unable to create accounting entry for currency rate difference. You have to configure the field 'Expense Currency Rate' on the company! ")) - raise osv.except_osv(_('Warning!'),_("First you have to configure the 'Income Currency Rate' on the company, then create accounting entry for currency rate difference.")) + raise osv.except_osv(_('Warning!'),_("First you have to configure the 'Expense Currency Rate' on the company, then create accounting entry for currency rate difference.")) else: account_id = line.voucher_id.company_id.income_currency_exchange_account_id if not account_id: - raise osv.except_osv(_('Warning'),_("Unable to create accounting entry for currency rate difference. You have to configure the field 'Income Currency Rate' on the company! ")) - raise osv.except_osv(_('Warning!'),_("First you have to configure the 'Expense Currency Rate' on the company, then create accounting entry for currency rate difference.")) + raise osv.except_osv(_('Warning!'),_("First you have to configure the 'Income Currency Rate' on the company, then create accounting entry for currency rate difference.")) # Even if the amount_currency is never filled, we need to pass the foreign currency because otherwise # the receivable/payable account may have a secondary currency, which render this field mandatory account_currency_id = company_currency <> current_currency and current_currency or False