From 32e55e174d25089edc3f6dadaf590f4e2571391b Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 30 Nov 2015 10:51:29 +0530 Subject: [PATCH] [minor] fix error message --- erpnext/accounts/doctype/journal_entry/journal_entry.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index e9449d7ef7..3edd4be3fa 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -750,6 +750,9 @@ def get_exchange_rate(account, account_currency=None, company=None, account_details = frappe.db.get_value("Account", account, ["account_type", "root_type", "account_currency", "company"], as_dict=1) + if not account_details: + frappe.throw(_("Please select correct account")) + if not company: company = account_details.company