diff --git a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.json b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.json index 394a5c75141c..158334f96323 100644 --- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.json +++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.json @@ -24,6 +24,7 @@ "preview", "col_break_email_1", "html_llwp", + "send_attached_files", "sec_break_email_2", "message_for_supplier", "terms_section_break", @@ -273,13 +274,20 @@ "fieldtype": "HTML", "options": "

In your Email Template, you can use the following special variables:\n

\n\n

\n

Apart from these, you can access all values in this RFQ, like {{ message_for_supplier }} or {{ terms }}.

", "read_only": 1 + }, + { + "default": "1", + "description": "If enabled, all files attached to this document will be attached to each email", + "fieldname": "send_attached_files", + "fieldtype": "Check", + "label": "Send Attached Files" } ], "icon": "fa fa-shopping-cart", "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2023-07-27 14:01:14.534594", + "modified": "2023-07-27 16:41:48.468873", "modified_by": "Administrator", "module": "Buying", "name": "Request for Quotation", 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 1c17233ab7c3..cae3c719361f 100644 --- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py +++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py @@ -202,7 +202,9 @@ def supplier_rfq_mail(self, data, update_password_link, rfq_link, preview=False) if preview: return {"message": message, "subject": subject} - attachments = self.get_attachments() + attachments = None + if self.send_attached_files: + attachments = self.get_attachments() self.send_email(data, sender, subject, message, attachments)