From 0521814deaa61caa5decfd7c145a8dc7be7e6756 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 16 Jun 2014 13:25:20 +0530 Subject: [PATCH] Fixed item query --- erpnext/controllers/queries.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py index a30cde72a5..a3b3ed2ffa 100644 --- a/erpnext/controllers/queries.py +++ b/erpnext/controllers/queries.py @@ -141,7 +141,7 @@ def item_query(doctype, txt, searchfield, start, page_len, filters): concat(substr(tabItem.description, 1, 40), "..."), description) as decription from tabItem where tabItem.docstatus < 2 - and (ifnull(tabItem.end_of_life, '') = '' or tabItem.end_of_life > %(today)s) + and (ifnull(tabItem.end_of_life, '0000-00-00') = '0000-00-00' or tabItem.end_of_life > %(today)s) and (tabItem.`{key}` LIKE %(txt)s or tabItem.item_name LIKE %(txt)s) {fcond} {mcond}