From 51621703cc1e5f194fa45de3df4a6d947519890e Mon Sep 17 00:00:00 2001 From: nidh-eesh Date: Fri, 3 Nov 2023 06:50:55 +0530 Subject: [PATCH] feat : Set notification and email for design request assignment --- aumms/aumms/doctype/design_request/design_request.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/aumms/aumms/doctype/design_request/design_request.py b/aumms/aumms/doctype/design_request/design_request.py index d9264c02..e09f955a 100644 --- a/aumms/aumms/doctype/design_request/design_request.py +++ b/aumms/aumms/doctype/design_request/design_request.py @@ -4,6 +4,7 @@ import frappe from frappe.model.document import Document from frappe.desk.form.assign_to import add as add_assign +from aumms.aumms.utils import create_notification_log class DesignRequest(Document): @@ -35,4 +36,9 @@ def assign_design_request(doctype, docname, assign_to): "name": docname }) frappe.db.set_value(doctype, docname, 'assigned_person', assign_to) - frappe.db.commit() \ No newline at end of file + frappe.db.commit() + + #Send system notification and email to assignee + subject = "New design request received" + content = "You've been assigned a new design request for analysis. Please review it at your earliest convenience." + create_notification_log(doctype, docname, assign_to, subject, content) \ No newline at end of file