From 09641073e3ff013fe49f22127e3164b22639c41e Mon Sep 17 00:00:00 2001 From: venkat102 Date: Fri, 22 Nov 2024 11:53:07 +0530 Subject: [PATCH] fix: filter with item group only if it is mentioned in pos profile --- erpnext/selling/page/point_of_sale/point_of_sale.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.py b/erpnext/selling/page/point_of_sale/point_of_sale.py index 28eadec9bc5c..206e51bbc5a9 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.py +++ b/erpnext/selling/page/point_of_sale/point_of_sale.py @@ -96,6 +96,8 @@ def __sort(p): 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]