Search for item_code (#13912)
Item query can be called from custom script to search for an additional field. In this case the item_name, item_group and item_description are still searchable, but not item_code. As the item code is a must have field in search results, I have added this to the non-changable search fields in this query.
This commit is contained in:
parent
dcc90e3312
commit
dae8f1b353
@ -168,6 +168,7 @@ def item_query(doctype, txt, searchfield, start, page_len, filters, as_dict=Fals
|
||||
and tabItem.disabled=0
|
||||
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_code LIKE %(txt)s
|
||||
or tabItem.item_group LIKE %(txt)s
|
||||
or tabItem.item_name LIKE %(txt)s
|
||||
or tabItem.item_code IN (select parent from `tabItem Barcode` where barcode LIKE %(txt)s
|
||||
|
Loading…
Reference in New Issue
Block a user