Merge branch 'version-13-pre-release' into version-13
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index 20097ef..5808090 100644
--- a/erpnext/__init__.py
+++ b/erpnext/__init__.py
@@ -5,7 +5,7 @@
from erpnext.hooks import regional_overrides
from frappe.utils import getdate
-__version__ = '13.4.0'
+__version__ = '13.4.1'
def get_default_company(user=None):
'''Get default company for user'''
diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py
index 46301b7..638503e 100644
--- a/erpnext/controllers/queries.py
+++ b/erpnext/controllers/queries.py
@@ -204,7 +204,7 @@
if "description" in searchfields:
searchfields.remove("description")
-
+
columns = ''
extra_searchfields = [field for field in searchfields
if not field in ["name", "item_group", "description"]]
@@ -216,9 +216,10 @@
if not field in searchfields]
searchfields = " or ".join([field + " like %(txt)s" for field in searchfields])
- if filters.get('supplier'):
- item_group_list = frappe.get_all('Supplier Item Group', filters = {'supplier': filters.get('supplier')}, fields = ['item_group'])
-
+ if filters and isinstance(filters, dict) and filters.get('supplier'):
+ item_group_list = frappe.get_all('Supplier Item Group',
+ filters = {'supplier': filters.get('supplier')}, fields = ['item_group'])
+
item_groups = []
for i in item_group_list:
item_groups.append(i.item_group)
@@ -227,7 +228,7 @@
if item_groups:
filters['item_group'] = ['in', item_groups]
-
+
description_cond = ''
if frappe.db.count('Item', cache=True) < 50000:
# scan description only if items are less than 50000