Skip to content

Commit

Permalink
fix: Ignore Customer Group Perm on AlL Products page (#25396)
Browse files Browse the repository at this point in the history
  • Loading branch information
marination committed Apr 19, 2021
1 parent c221682 commit b91fcbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/accounts/doctype/pricing_rule/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def _get_tree_conditions(args, parenttype, table, allow_blank=True):
if parenttype in ["Customer Group", "Item Group", "Territory"]:
parent_field = "parent_{0}".format(frappe.scrub(parenttype))
root_name = frappe.db.get_list(parenttype,
{"is_group": 1, parent_field: ("is", "not set")}, "name", as_list=1)
{"is_group": 1, parent_field: ("is", "not set")}, "name", as_list=1, ignore_permissions=True)

if root_name and root_name[0][0]:
parent_groups.append(root_name[0][0])
Expand Down

0 comments on commit b91fcbd

Please sign in to comment.