diff --git a/erpnext/controllers/recurring_document.py b/erpnext/controllers/recurring_document.py index f9ab50965c..9edac2e803 100644 --- a/erpnext/controllers/recurring_document.py +++ b/erpnext/controllers/recurring_document.py @@ -4,7 +4,7 @@ import frappe.utils import frappe.defaults from frappe.utils import add_days, cint, cstr, date_diff, flt, getdate, nowdate, \ - get_first_day, get_last_day, comma_and + get_first_day, get_last_day, comma_and, split_emails from frappe.model.naming import make_autoname from frappe import _, msgprint, throw @@ -33,7 +33,7 @@ def manage_recurring_documents(doctype, next_date=None, commit=True): next_date = next_date or nowdate() date_field = date_field_map[doctype] - + condition = " and ifnull(status, '') != 'Stopped'" if doctype in ("Sales Order", "Purchase Order") else "" recurring_documents = frappe.db.sql("""select name, recurring_id @@ -180,8 +180,7 @@ def convert_to_recurring(doc, posting_date): def validate_notification_email_id(doc): if doc.notification_email_address: - email_list = filter(None, [cstr(email).strip() for email in - doc.notification_email_address.replace("\n", "").split(",")]) + email_list = split_emails(doc.notification_email_address.replace("\n", "")) from frappe.utils import validate_email_add for email in email_list: diff --git a/erpnext/crm/doctype/newsletter/newsletter.py b/erpnext/crm/doctype/newsletter/newsletter.py index 83d3caf37a..800a5abef9 100644 --- a/erpnext/crm/doctype/newsletter/newsletter.py +++ b/erpnext/crm/doctype/newsletter/newsletter.py @@ -20,7 +20,7 @@ class Newsletter(Document): group by status""", (self.doctype, self.name))) or None def test_send(self, doctype="Lead"): - self.recipients = self.test_email_id.split(",") + self.recipients = frappe.utils.split_emails(self.test_email_id) self.send_bulk() frappe.msgprint(_("Scheduled to send to {0}").format(self.test_email_id)) diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 56bda40d15..b6692f9be1 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -120,7 +120,7 @@ scheduler_events = { ] } -default_mail_footer = """