mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 18:59:08 +00:00
fix: don't show non-stock items in Stock Analytics report
This commit is contained in:
@@ -270,7 +270,7 @@ def get_items(filters):
|
|||||||
if item_code := filters.get("item_code"):
|
if item_code := filters.get("item_code"):
|
||||||
return [item_code]
|
return [item_code]
|
||||||
else:
|
else:
|
||||||
item_filters = {}
|
item_filters = {"is_stock_item": 1}
|
||||||
if item_group := filters.get("item_group"):
|
if item_group := filters.get("item_group"):
|
||||||
children = get_descendants_of("Item Group", item_group, ignore_permissions=True)
|
children = get_descendants_of("Item Group", item_group, ignore_permissions=True)
|
||||||
item_filters["item_group"] = ("in", children + [item_group])
|
item_filters["item_group"] = ("in", children + [item_group])
|
||||||
|
|||||||
Reference in New Issue
Block a user