mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 00:44:45 +00:00
[hotfix] Product Search
This commit is contained in:
@@ -18,14 +18,14 @@ def get_product_list(search=None, start=0, limit=10):
|
|||||||
|
|
||||||
# search term condition
|
# search term condition
|
||||||
if search:
|
if search:
|
||||||
query += """and web_long_description like %(search)s
|
query += """ and (web_long_description like %(search)s
|
||||||
or description like %(search)s
|
or description like %(search)s
|
||||||
or item_name like %(search)s
|
or item_name like %(search)s
|
||||||
or name like %(search)s)"""
|
or name like %(search)s)"""
|
||||||
search = "%" + cstr(search) + "%"
|
search = "%" + cstr(search) + "%"
|
||||||
|
|
||||||
# order by
|
# order by
|
||||||
query += """order by weightage desc, modified desc limit %s, %s""" % (start, limit)
|
query += """ order by weightage desc, modified desc limit %s, %s""" % (start, limit)
|
||||||
|
|
||||||
data = frappe.db.sql(query, {
|
data = frappe.db.sql(query, {
|
||||||
"search": search,
|
"search": search,
|
||||||
|
|||||||
Reference in New Issue
Block a user