mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 11:39:18 +00:00
fix: Parent condition in pricing rules
This commit is contained in:
@@ -168,7 +168,7 @@ def _get_tree_conditions(args, parenttype, table, allow_blank=True):
|
|||||||
frappe.throw(_("Invalid {0}").format(args.get(field)))
|
frappe.throw(_("Invalid {0}").format(args.get(field)))
|
||||||
|
|
||||||
parent_groups = frappe.db.sql_list("""select name from `tab%s`
|
parent_groups = frappe.db.sql_list("""select name from `tab%s`
|
||||||
where lft>=%s and rgt<=%s""" % (parenttype, '%s', '%s'), (lft, rgt))
|
where lft<=%s and rgt>=%s""" % (parenttype, '%s', '%s'), (lft, rgt))
|
||||||
|
|
||||||
if parenttype in ["Customer Group", "Item Group", "Territory"]:
|
if parenttype in ["Customer Group", "Item Group", "Territory"]:
|
||||||
parent_field = "parent_{0}".format(frappe.scrub(parenttype))
|
parent_field = "parent_{0}".format(frappe.scrub(parenttype))
|
||||||
|
|||||||
Reference in New Issue
Block a user