mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-18 17:15:04 +00:00
Merge pull request #44283 from frappe/mergify/bp/version-15-hotfix/pr-44277
fix: filter with item group only if it is mentioned in pos profile (backport #44277)
This commit is contained in:
@@ -96,6 +96,8 @@ def search_by_term(search_term, warehouse, price_list):
|
||||
def filter_result_items(result, pos_profile):
|
||||
if result and result.get("items"):
|
||||
pos_item_groups = frappe.db.get_all("POS Item Group", {"parent": pos_profile}, pluck="item_group")
|
||||
if not pos_item_groups:
|
||||
return
|
||||
result["items"] = [item for item in result.get("items") if item.get("item_group") in pos_item_groups]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user