fix: fetch item on the base of item group

This commit is contained in:
Anurag Mishra
2019-06-12 19:09:51 +05:30
parent 4ca393d14c
commit bbe2c4fb01
2 changed files with 7 additions and 1 deletions

View File

@@ -152,6 +152,9 @@ def tax_account_query(doctype, txt, searchfield, start, page_len, filters):
def item_query(doctype, txt, searchfield, start, page_len, filters, as_dict=False):
conditions = []
if not filters["item_group"]:
filters.pop("item_group", None)
description_cond = ''
if frappe.db.count('Item', cache=True) < 50000:
# scan description only if items are less than 50000