From 34df9ab7d52349f9b071609e1d4bc8d4acea88d7 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 10 Jan 2023 22:19:24 +0530 Subject: [PATCH] fix: RFQ emails not sent with pdf attachment (#33604) fix: RFQ emails not sent with pdf attachment (#33604) (cherry picked from commit e0f5ecdad6d181ce3c69afc2cab7df832e27baa4) Co-authored-by: Smit Vora --- .../doctype/request_for_quotation/request_for_quotation.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py index dbc36449570..8e9ded98421 100644 --- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py +++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py @@ -216,6 +216,7 @@ class RequestforQuotation(BuyingController): recipients=data.email_id, sender=sender, attachments=attachments, + print_format=self.meta.default_print_format or "Standard", send_email=True, doctype=self.doctype, name=self.name, @@ -224,9 +225,7 @@ class RequestforQuotation(BuyingController): frappe.msgprint(_("Email Sent to Supplier {0}").format(data.supplier)) def get_attachments(self): - attachments = [d.name for d in get_attachments(self.doctype, self.name)] - attachments.append(frappe.attach_print(self.doctype, self.name, doc=self)) - return attachments + return [d.name for d in get_attachments(self.doctype, self.name)] def update_rfq_supplier_status(self, sup_name=None): for supplier in self.suppliers: