fix(selling): apply template party rules to variants

This commit is contained in:
pandiyan
2026-10-22 12:09:47 +05:30
parent ae55dd3252
commit a0f2bb4192
@@ -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