diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index 752085e5f99..481c5f79ca5 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -536,10 +536,12 @@ class PaymentRequest(Document): row_number += TO_SKIP_NEW_ROW -@frappe.whitelist(allow_guest=True) +@frappe.whitelist() def make_payment_request(**args): """Make payment request""" + frappe.has_permission(doctype="Payment Request", ptype="write", throw=True) + args = frappe._dict(args) if args.dt not in ALLOWED_DOCTYPES_FOR_PAYMENT_REQUEST: