Skip to content

Commit

Permalink
feat : Set notification and email for design request assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
nidh-eesh committed Nov 3, 2023
1 parent 144e6ff commit 5162170
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion aumms/aumms/doctype/design_request/design_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):

Expand Down Expand Up @@ -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()
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)

0 comments on commit 5162170

Please sign in to comment.