Revert "fix: add child item groups into the filters (#26997)" (#27266) (#27268)

This reverts commit c60d5523bc.

(cherry picked from commit 763450dcf8)

Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com>
This commit is contained in:
Frappe PR Bot
2021-08-31 19:13:04 +05:30
committed by GitHub
parent 0c4f29edcf
commit 155df936cd

View File

@@ -44,18 +44,6 @@ def get_data(filters, period_list, partner_doctype):
if d.item_group not in item_groups:
item_groups.append(d.item_group)
if item_groups:
child_items = []
for item_group in item_groups:
if frappe.db.get_value("Item Group", {"name":item_group}, "is_group"):
for child_item_group in frappe.get_all("Item Group", {"parent_item_group":item_group}):
if child_item_group['name'] not in child_items:
child_items.append(child_item_group['name'])
for item in child_items:
if item not in item_groups:
item_groups.append(item)
date_field = ("transaction_date"
if filters.get('doctype') == "Sales Order" else "posting_date")