From ad84c57ee800261b28f2e67c081d46e52f3d560e Mon Sep 17 00:00:00 2001 From: Nidheesh P Date: Tue, 7 Nov 2023 16:18:51 +0530 Subject: [PATCH] feat: Created notification for Head of Smith on BOM assignment --- aumms/aumms/doctype/design_analysis/design_analysis.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/aumms/aumms/doctype/design_analysis/design_analysis.py b/aumms/aumms/doctype/design_analysis/design_analysis.py index 53803db4..48932ce8 100644 --- a/aumms/aumms/doctype/design_analysis/design_analysis.py +++ b/aumms/aumms/doctype/design_analysis/design_analysis.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 DesignAnalysis(Document): def autoname(self): @@ -30,6 +31,10 @@ def create_bom_function(doctype, docname,assign_to): "doctype": bom.doctype, "name": bom.name }) + #Send system notification and email to assignee + subject = "New BOM request received" + content = "You've been assigned a new BOM for work order creation. Please review it at your earliest convenience." + create_notification_log(doctype, docname, assign_to, subject, content) return True else: