[Fix] Letterhead did not show up on email alert attachment (#5192)
This commit is contained in:
parent
b9c00266e4
commit
4e383ed32e
2 changed files with 5 additions and 3 deletions
|
|
@ -175,7 +175,7 @@ def _notify(doc, print_html=None, print_format=None, attachments=None,
|
|||
communication=doc.name,
|
||||
read_receipt=doc.read_receipt,
|
||||
is_notification=True if doc.sent_or_received =="Received" else False,
|
||||
print_letterhead=True if frappe.flags.print_letterhead=='true' else False
|
||||
print_letterhead=frappe.flags.print_letterhead
|
||||
)
|
||||
|
||||
def update_parent_mins_to_first_response(doc):
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ def get_context(context):
|
|||
title=_("Error in Email Alert"))
|
||||
else:
|
||||
return [{"print_format_attachment":1, "doctype":doc.doctype, "name": doc.name,
|
||||
"print_format":self.print_format}]
|
||||
"print_format":self.print_format, "print_letterhead": print_settings.with_letterhead}]
|
||||
|
||||
context = get_context(doc)
|
||||
recipients = []
|
||||
|
|
@ -172,7 +172,9 @@ def get_context(context):
|
|||
message= frappe.render_template(self.message, context),
|
||||
reference_doctype = doc.doctype,
|
||||
reference_name = doc.name,
|
||||
attachments = attachments)
|
||||
attachments = attachments,
|
||||
print_letterhead = ((attachments
|
||||
and attachments[0].get('print_letterhead')) or False))
|
||||
|
||||
if self.set_property_after_alert:
|
||||
frappe.db.set_value(doc.doctype, doc.name, self.set_property_after_alert,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue