|
|
@@ -94,7 +94,11 @@ def evaluate_alert(doc, alert, event): |
|
|
|
if not recipients: |
|
|
|
return |
|
|
|
|
|
|
|
frappe.sendmail(recipients=recipients, subject=alert.subject, |
|
|
|
subject = alert.subject |
|
|
|
if "{" in subject: |
|
|
|
subject = frappe.render_template(alert.subject, {"doc": doc, "alert": alert}) |
|
|
|
|
|
|
|
frappe.sendmail(recipients=recipients, subject=subject, |
|
|
|
message= frappe.render_template(alert.message, {"doc": doc, "alert":alert}), |
|
|
|
bulk=True, reference_doctype = doc.doctype, reference_name = doc.name, |
|
|
|
attachments = [frappe.attach_print(doc.doctype, doc.name)] if alert.attach_print else None) |