mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-31 23:33:43 +00:00
Email alert renamed to Notification (#14618)
This commit is contained in:
committed by
Rushabh Mehta
parent
3946b77555
commit
fc2292f08c
@@ -29,7 +29,7 @@ def make_sample_data(domains, make_dependent = False):
|
||||
make_material_request(frappe.get_all("Item"))
|
||||
|
||||
make_projects(domains)
|
||||
import_email_alert()
|
||||
import_notification()
|
||||
|
||||
def make_opportunity(items, customer):
|
||||
b = frappe.get_doc({
|
||||
@@ -159,11 +159,11 @@ def make_projects(domains):
|
||||
|
||||
project.insert(ignore_permissions=True)
|
||||
|
||||
def import_email_alert():
|
||||
'''Import email alert for task start'''
|
||||
def import_notification():
|
||||
'''Import notification for task start'''
|
||||
with open (os.path.join(os.path.dirname(__file__), "tasks/task_alert.json")) as f:
|
||||
email_alert = frappe.get_doc(json.loads(f.read())[0])
|
||||
email_alert.insert()
|
||||
notification = frappe.get_doc(json.loads(f.read())[0])
|
||||
notification.insert()
|
||||
|
||||
# trigger the first message!
|
||||
from frappe.email.doctype.notification.notification import trigger_daily_alerts
|
||||
@@ -174,4 +174,4 @@ def test_sample():
|
||||
frappe.db.sql('delete from tabProject')
|
||||
frappe.db.sql('delete from tabTask')
|
||||
make_projects('Education')
|
||||
import_email_alert()
|
||||
import_notification()
|
||||
@@ -5,12 +5,12 @@
|
||||
"date_changed": "exp_end_date",
|
||||
"days_in_advance": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "Email Alert",
|
||||
"doctype": "Notification",
|
||||
"document_type": "Task",
|
||||
"enabled": 1,
|
||||
"event": "Days After",
|
||||
"is_standard": 0,
|
||||
"message": "<p>Task due today:</p>\n\n<div>\n{{ doc.description }}\n</div>\n\n<hr>\n<p style=\"font-size: 85%\">\nThis is a notification for a task that is due today, and a sample <b>Email Alert</b>. In ERPNext you can setup email alerts on anything, Invoices, Orders, Leads, Opportunities, so you never miss a thing.\n<br>To edit this, and setup other alerts, just type <b>Email Alert</b> in the search bar.</p>",
|
||||
"message": "<p>Task due today:</p>\n\n<div>\n{{ doc.description }}\n</div>\n\n<hr>\n<p style=\"font-size: 85%\">\nThis is a notification for a task that is due today, and a sample <b>Notification</b>. In ERPNext you can setup notifications on anything, Invoices, Orders, Leads, Opportunities, so you never miss a thing.\n<br>To edit this, and setup other alerts, just type <b>Notification</b> in the search bar.</p>",
|
||||
"method": null,
|
||||
"modified": "2017-03-09 07:34:58.168370",
|
||||
"module": null,
|
||||
|
||||
Reference in New Issue
Block a user