From d441ce9c0270394f776ce7a38b8f8ba73d032ce6 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 15 Oct 2012 14:50:08 +0530 Subject: [PATCH] fixed message url in recurring invoice error message --- accounts/doctype/gl_control/gl_control.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/accounts/doctype/gl_control/gl_control.py b/accounts/doctype/gl_control/gl_control.py index e8091dfc34..71d5a0b252 100644 --- a/accounts/doctype/gl_control/gl_control.py +++ b/accounts/doctype/gl_control/gl_control.py @@ -438,7 +438,15 @@ def manage_recurring_invoices(): def notify_errors(inv, owner): + import webnotes from webnotes.utils import get_request_site_address + url = get_request_site_address() + if not url or url=='http://localhost': + new_url = webnotes.conn.get_value('Website Settings', 'Website Settings', + 'subdomain') + if new_url: + url = new_url + exception_msg = """ Dear User, @@ -459,7 +467,7 @@ def notify_errors(inv, owner): Regards, Administrator - """ % (inv, get_request_site_address(), inv) + """ % (inv, url, inv) subj = "[Urgent] Error while creating recurring invoice from %s" % inv import webnotes.utils recipients = webnotes.utils.get_system_managers_list()