mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-09 15:29:30 +00:00
fix(accounts): add permission checks on send_proforma_email (#58933)
This commit is contained in:
@@ -212,6 +212,7 @@ def _proforma_line(so_item, based_on: str, row: dict) -> dict | None:
|
||||
@frappe.whitelist()
|
||||
def send_proforma_email(proforma_name: str, recipients: str) -> None:
|
||||
proforma = frappe.get_doc("Proforma Invoice", proforma_name)
|
||||
proforma.check_permission("email")
|
||||
if proforma.docstatus != 1:
|
||||
frappe.throw(_("Only an issued Proforma Invoice can be emailed."))
|
||||
if not proforma.proforma_pdf:
|
||||
|
||||
Reference in New Issue
Block a user