Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: RFQ emails not sent with pdf attachment (backport #33604) #33607

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ def send_email(self, data, sender, subject, message, attachments):
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,
Expand All @@ -224,9 +225,7 @@ def send_email(self, data, sender, subject, message, attachments):
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:
Expand Down