fix: Let Administrator delete company transactions (#25300)
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
This commit is contained in:
parent
d4fd1038dc
commit
c4565651ff
@ -15,7 +15,7 @@ def delete_company_transactions(company_name):
|
||||
frappe.only_for("System Manager")
|
||||
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.PermissionError)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user