- query fix

This commit is contained in:
Giovanni 2017-12-10 20:46:46 +01:00
parent 2a098ada7c
commit ff7d73e418

View File

@ -166,7 +166,7 @@ def item_query(doctype, txt, searchfield, start, page_len, filters, as_dict=Fals
or tabItem.item_group LIKE %(txt)s
or tabItem.item_name LIKE %(txt)s
or tabItem.description LIKE %(txt)s)
or tabItem.name IN (select parent from `tabItem Barcode` where barcode LIKE %(txt)s)
or tabItem.item_code IN (select parent from `tabItem Barcode` where barcode LIKE %(txt)s)
{fcond} {mcond}
order by
if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999),