diff --git a/frappe/__init__.py b/frappe/__init__.py index dfbef90a17..196d6da92d 100644 --- a/frappe/__init__.py +++ b/frappe/__init__.py @@ -14,7 +14,7 @@ import os, sys, importlib, inspect, json from .exceptions import * from .utils.jinja import get_jenv, get_template, render_template, get_email_from_template -__version__ = '10.1.5' +__version__ = '10.1.6' __title__ = "Frappe Framework" local = Local() diff --git a/frappe/core/doctype/communication/email.py b/frappe/core/doctype/communication/email.py index c6d0e9fcb1..00b9918933 100755 --- a/frappe/core/doctype/communication/email.py +++ b/frappe/core/doctype/communication/email.py @@ -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): diff --git a/frappe/email/doctype/email_alert/email_alert.py b/frappe/email/doctype/email_alert/email_alert.py index a90dbb53da..1f30e58cbf 100755 --- a/frappe/email/doctype/email_alert/email_alert.py +++ b/frappe/email/doctype/email_alert/email_alert.py @@ -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,