diff --git a/buying/doctype/purchase_common/purchase_common.js b/buying/doctype/purchase_common/purchase_common.js index 7d3d600c0a..9b05bc5e34 100644 --- a/buying/doctype/purchase_common/purchase_common.js +++ b/buying/doctype/purchase_common/purchase_common.js @@ -56,8 +56,8 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({ } } else { return{ - query:"controllers.queries.item_query", - filters:{ 'is_purchase_item': 'Yes' } + query: "controllers.queries.item_query", + filters: { 'is_purchase_item': 'Yes' } } } }); diff --git a/controllers/queries.py b/controllers/queries.py index 67d53184d5..b3556e5229 100644 --- a/controllers/queries.py +++ b/controllers/queries.py @@ -29,7 +29,7 @@ def get_filters_cond(doctype, filters, conditions): flt.append([doctype, f[0], '=', f[1]]) from webnotes.widgets.reportview import build_filter_conditions - build_filter_conditions(filters, conditions) + build_filter_conditions(flt, conditions) cond = ' and ' + ' and '.join(conditions) else: cond = ''