mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 08:54:45 +00:00
fix: Let Administrator delete company transactions (#25300)
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
This commit is contained in:
@@ -15,7 +15,7 @@ def delete_company_transactions(company_name):
|
|||||||
frappe.only_for("System Manager")
|
frappe.only_for("System Manager")
|
||||||
doc = frappe.get_doc("Company", company_name)
|
doc = frappe.get_doc("Company", company_name)
|
||||||
|
|
||||||
if frappe.session.user != doc.owner:
|
if frappe.session.user != doc.owner and frappe.session.user != 'Administrator':
|
||||||
frappe.throw(_("Transactions can only be deleted by the creator of the Company"),
|
frappe.throw(_("Transactions can only be deleted by the creator of the Company"),
|
||||||
frappe.PermissionError)
|
frappe.PermissionError)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user