mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 08:24:47 +00:00
Merge pull request #5830 from MaxMorais/patch-6
Extend search_fields for customer querie
This commit is contained in:
@@ -85,6 +85,9 @@ def customer_query(doctype, txt, searchfield, start, page_len, filters):
|
|||||||
fields = ["name", "customer_group", "territory"]
|
fields = ["name", "customer_group", "territory"]
|
||||||
else:
|
else:
|
||||||
fields = ["name", "customer_name", "customer_group", "territory"]
|
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)
|
fields = ", ".join(fields)
|
||||||
|
|
||||||
@@ -364,4 +367,4 @@ def get_expense_account(doctype, txt, searchfield, start, page_len, filters):
|
|||||||
match_condition=get_match_cond(doctype)), {
|
match_condition=get_match_cond(doctype)), {
|
||||||
'company': filters.get("company", ""),
|
'company': filters.get("company", ""),
|
||||||
'txt': "%%%s%%" % frappe.db.escape(txt)
|
'txt': "%%%s%%" % frappe.db.escape(txt)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user