From 4e383ed32e98c42fe663f52a8543a283d90aaa86 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Tue, 13 Mar 2018 18:11:46 +0530 Subject: [PATCH 1/2] [Fix] Letterhead did not show up on email alert attachment (#5192) --- frappe/core/doctype/communication/email.py | 2 +- frappe/email/doctype/email_alert/email_alert.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) 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, From a24fa803717e0f247e933edcd57dd059599a8e65 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 13 Mar 2018 18:42:59 +0600 Subject: [PATCH 2/2] bumped to version 10.1.6 --- frappe/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()