Пример #1
0
def import_notification():
	'''Import notification for task start'''
	with open (os.path.join(os.path.dirname(__file__), "tasks/task_alert.json")) as f:
		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
	trigger_daily_alerts()
Пример #2
0
def import_notification():
	'''Import notification for task start'''
	with open (os.path.join(os.path.dirname(__file__), "tasks/task_alert.json")) as f:
		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
	trigger_daily_alerts()