[minor] Item query - search by description

This commit is contained in:
Anand Doshi 2014-07-21 17:51:14 +05:30
parent 994d9075b4
commit 7fcb3c9865

View File

@ -167,7 +167,8 @@ def item_query(doctype, txt, searchfield, start, page_len, filters):
where tabItem.docstatus < 2
and (tabItem.end_of_life > %(today)s or ifnull(tabItem.end_of_life, '0000-00-00')='0000-00-00')
and (tabItem.`{key}` LIKE %(txt)s
or tabItem.item_name LIKE %(txt)s)
or tabItem.item_name LIKE %(txt)s
or tabItem.description LIKE %(txt)s)
{fcond} {mcond}
order by
if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999),