erpnext_pdf-on-submit
erpnext_pdf-on-submit copied to clipboard
Send PDF by email
- Every time a PDF gets created, it should be sent to the customer by email.
contact_email_list = frappe.get_list('Contact Email', fields=['email_id'], filters={'parent': sinv.contact_person, 'is_primary': 1})
contact_email = contact_email_list[0].get('email_id') if contact_email_list else None
address_email = frappe.get_value('Address', sinv.customer_address, 'email_id')
to_mail = contact_email or address_email
- Allow to set an Email Template for every DocType in PDF On Submit Settings.
- Allow to enable/disable this feature.
I guess this can be achived by using a Notifcation. Please consider closing. https://doku.phamos.eu/books/erpnext-benutzerhandbuch/page/mitteilung-notification