From 7a9bd41a7267025e1d9413aec7d5275d632f1dcd Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 24 May 2017 16:18:27 +0530 Subject: [PATCH] Improved currency exchange rate message --- erpnext/setup/utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/setup/utils.py b/erpnext/setup/utils.py index 55a0fd3c01..46e4d5c4f5 100644 --- a/erpnext/setup/utils.py +++ b/erpnext/setup/utils.py @@ -91,8 +91,7 @@ def get_exchange_rate(from_currency, to_currency, transaction_date=None): response.raise_for_status() value = response.json()["rates"][to_currency] cache.setex(key, value, 6 * 60 * 60) - return flt(value) except: - frappe.msgprint(_("Unable to find exchange rate for {0} to {1} for key date {2}").format(from_currency, to_currency, transaction_date)) + frappe.msgprint(_("Unable to find exchange rate for {0} to {1} for key date {2}. Please create a Currency Exchange record manually").format(from_currency, to_currency, transaction_date)) return 0.0 \ No newline at end of file