mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-14 07:01:56 +00:00
fix: drop ignore_permissions handling from add_ac
(cherry picked from commit 37d2adc74b)
This commit is contained in:
@@ -445,15 +445,13 @@ def add_ac(args=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