Merge pull request #13698 from leela/fix-email-attachments

fix: sending document as an attachment through mail
This commit is contained in:
Leela vadlamudi 2021-07-14 10:47:28 +05:30 committed by GitHub
commit ee1b27587d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -176,8 +176,8 @@ class CommunicationEmailMixin:
def mail_attachments(self, print_format=None, print_html=None):
final_attachments = []
if print_format and print_html:
d = {'print_format': print_format, 'print_html': print_html, 'print_format_attachment': 1,
if print_format or print_html:
d = {'print_format': print_format, 'html': print_html, 'print_format_attachment': 1,
'doctype': self.reference_doctype, 'name': self.reference_name}
final_attachments.append(d)