fix: Let Administrator delete company transactions (#25300)

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
This commit is contained in:
Ganga Manoj 2021-04-14 17:11:36 +05:30 committed by GitHub
parent d4fd1038dc
commit c4565651ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)