Merge pull request #5830 from MaxMorais/patch-6

Extend search_fields for customer querie
This commit is contained in:
Rushabh Mehta 2016-07-22 11:10:54 +05:30 committed by GitHub
commit 0e3e16cda0

View File

@ -86,6 +86,9 @@ def customer_query(doctype, txt, searchfield, start, page_len, filters):
else:
fields = ["name", "customer_name", "customer_group", "territory"]
meta = frappe.get_meta("Customer")
fields = fields + [f for f in meta.get_search_fields() if not f in fields]
fields = ", ".join(fields)
return frappe.db.sql("""select {fields} from `tabCustomer`