diff --git a/erpnext/controllers/tests/test_recurring_document.py b/erpnext/controllers/tests/test_recurring_document.py index 0723f3d14a8..71321124f32 100644 --- a/erpnext/controllers/tests/test_recurring_document.py +++ b/erpnext/controllers/tests/test_recurring_document.py @@ -15,6 +15,7 @@ def test_recurring_document(obj, test_records): base_doc.update({ "is_recurring": 1, + "submit_on_create": 1, "recurring_type": "Monthly", "notification_email_address": "test@example.com, test1@example.com, test2@example.com", "repeat_on_day_of_month": getdate(today).day, diff --git a/erpnext/patches/v6_24/set_recurring_id.py b/erpnext/patches/v6_24/set_recurring_id.py index e8786a23d41..85a39e3371f 100644 --- a/erpnext/patches/v6_24/set_recurring_id.py +++ b/erpnext/patches/v6_24/set_recurring_id.py @@ -4,7 +4,7 @@ def execute(): for doctype in ('Sales Order', 'Purchase Order', 'Sales Invoice', 'Purchase Invoice'): frappe.reload_doctype(doctype) - frappe.db.sql('''update `tab{0}` set submit_on_creation=1 + frappe.db.sql('''update `tab{0}` set submit_on_creation=1, notify_by_email=1 where is_recurring=1'''.format(doctype)) frappe.db.sql('''update `tab{0}` set notify_by_email=1 where is_recurring=1'''.format(doctype))