Add Delivery Settings + improve 'Notify Customers' functionality (#15322)

* Add Delivery Settings + improve 'Notify Customers' functionality

* Minor improvements

* Add patch to create a default dispatch notification template

* Fix travis errors
This commit is contained in:
Alchez
2018-09-30 21:38:47 +05:30
committed by Rushabh Mehta
parent 4fd7a4e0d7
commit 6ecb2556b7
17 changed files with 641 additions and 339 deletions

View File

@@ -55,6 +55,10 @@ def set_default_settings(args):
buying_settings.allow_multiple_items = 1
buying_settings.save()
delivery_settings = frappe.get_doc("Delivery Settings")
delivery_settings.dispatch_template = _("Dispatch Notification")
delivery_settings.save()
hr_settings = frappe.get_doc("HR Settings")
hr_settings.emp_created_by = "Naming Series"
hr_settings.leave_approval_notification_template = _("Leave Approval Notification")

View File

@@ -250,6 +250,12 @@ def install(country=None):
records += [{'doctype': 'Email Template', 'name': _("Leave Status Notification"), 'response': response,\
'subject': _("Leave Status Notification"), 'owner': frappe.session.user}]
base_path = frappe.get_app_path("erpnext", "stock", "doctype")
response = frappe.read_file(os.path.join(base_path, "delivery_trip/dispatch_notification_template.html"))
records += [{'doctype': 'Email Template', 'name': _("Dispatch Notification"), 'response': response,\
'subject': _("Your order is out for delivery!"), 'owner': frappe.session.user}]
# Records for the Supplier Scorecard
from erpnext.buying.doctype.supplier_scorecard.supplier_scorecard import make_default_records
make_default_records()