diff --git a/frappe/email/doctype/auto_email_report/auto_email_report.py b/frappe/email/doctype/auto_email_report/auto_email_report.py index 8f468f3de5..01b8566982 100644 --- a/frappe/email/doctype/auto_email_report/auto_email_report.py +++ b/frappe/email/doctype/auto_email_report/auto_email_report.py @@ -139,7 +139,9 @@ class AutoEmailReport(Document): recipients = self.email_to.split(), subject = self.name, message = message, - attachments = attachments + attachments = attachments, + reference_doctype = self.doctype, + reference_name = self.name ) @frappe.whitelist()