mirror of
https://github.com/frappe/erpnext.git
synced 2026-10-29 22:57:42 +00:00
fix(selling): apply template party rules to variants
This commit is contained in:
@@ -45,4 +45,8 @@ def get_party_specific_items(party):
|
||||
):
|
||||
field = "name" if rule.restrict_based_on == "Item" else frappe.scrub(rule.restrict_based_on)
|
||||
allowed_items[field].append(rule.based_on_value)
|
||||
if allowed_items.get("name"):
|
||||
allowed_items["name"].extend(
|
||||
frappe.get_all("Item", filters={"variant_of": ["in", allowed_items["name"]]}, pluck="name")
|
||||
)
|
||||
return allowed_items
|
||||
|
||||
Reference in New Issue
Block a user