Skip to content

Commit

Permalink
fix: RFQ emails not sent with pdf attachment (#33604)
Browse files Browse the repository at this point in the history
(cherry picked from commit e0f5ecd)
  • Loading branch information
vorasmit authored and mergify[bot] committed Jan 10, 2023
1 parent 39e5aab commit e4f80ed
Showing 1 changed file with 2 additions and 3 deletions.
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

0 comments on commit e4f80ed

Please sign in to comment.