From e2b29404521ad3a0567fd7819da91cbad8b8942f Mon Sep 17 00:00:00 2001 From: Diptanil Saha Date: Wed, 9 Sep 2026 15:23:29 +0530 Subject: [PATCH] fix(accounts): add permission checks on `send_proforma_email` (#58933) --- erpnext/selling/doctype/proforma_invoice/proforma_invoice.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/selling/doctype/proforma_invoice/proforma_invoice.py b/erpnext/selling/doctype/proforma_invoice/proforma_invoice.py index 2fbf068d882..e8452293cfb 100644 --- a/erpnext/selling/doctype/proforma_invoice/proforma_invoice.py +++ b/erpnext/selling/doctype/proforma_invoice/proforma_invoice.py @@ -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: