From 2482bf32c03dcc0c5cf083c59e944452f1cf4db1 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 15 Oct 2012 12:32:58 +0530 Subject: [PATCH] fix in recurring invoice error email --- accounts/doctype/gl_control/gl_control.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/accounts/doctype/gl_control/gl_control.py b/accounts/doctype/gl_control/gl_control.py index 005567e761d..e8091dfc34d 100644 --- a/accounts/doctype/gl_control/gl_control.py +++ b/accounts/doctype/gl_control/gl_control.py @@ -438,14 +438,15 @@ def manage_recurring_invoices(): def notify_errors(inv, owner): + from webnotes.utils import get_request_site_address exception_msg = """ Dear User, - An error occured while creating recurring invoice from %s. + An error occured while creating recurring invoice from %s (at %s). May be there are some invalid email ids mentioned in the invoice. - To stop sending repetitive error notifications from the system, we have unchecked \ + To stop sending repetitive error notifications from the system, we have unchecked "Convert into Recurring" field in the invoice %s. @@ -458,11 +459,11 @@ def notify_errors(inv, owner): Regards, Administrator - """ % (inv, inv) + """ % (inv, get_request_site_address(), inv) subj = "[Urgent] Error while creating recurring invoice from %s" % inv import webnotes.utils recipients = webnotes.utils.get_system_managers_list() - recipients += ['support@erpnext.com', owner] + recipients += [webnotes.conn.get_value("Profile", owner, "email")] assign_task_to_owner(inv, exception_msg, recipients) sendmail(recipients, subject=subj, msg = exception_msg)