mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-30 23:18:02 +00:00
Merge pull request #55665 from Shllokkk/add-ac-ignore-permissions-fix
fix: drop ignore_permissions handling from add_ac
This commit is contained in:
@@ -446,15 +446,13 @@ def add_ac(args: frappe._dict | None = None):
|
|||||||
if not args:
|
if not args:
|
||||||
args = frappe.local.form_dict
|
args = frappe.local.form_dict
|
||||||
|
|
||||||
|
args.pop("ignore_permissions", None)
|
||||||
|
frappe.has_permission("Account", "create", throw=True)
|
||||||
|
|
||||||
args.doctype = "Account"
|
args.doctype = "Account"
|
||||||
args = make_tree_args(**args)
|
args = make_tree_args(**args)
|
||||||
|
|
||||||
ac = frappe.new_doc("Account")
|
ac = frappe.new_doc("Account")
|
||||||
|
|
||||||
if args.get("ignore_permissions"):
|
|
||||||
ac.flags.ignore_permissions = True
|
|
||||||
args.pop("ignore_permissions")
|
|
||||||
|
|
||||||
ac.update(args)
|
ac.update(args)
|
||||||
|
|
||||||
if not ac.parent_account:
|
if not ac.parent_account:
|
||||||
|
|||||||
Reference in New Issue
Block a user