Hello,
I have one question that how i customise autocomplete suggestion list.
Currently suppose i linked with item doctype that in autocomplete list i got item name and item group but i also want item unit to combine with item group in autocomplete list.
So anyone can assist me how it would be possible.
Thanks,
Harsh Mehta
Add Item Unit in Search Fields from customize form.
Hi saurabh,
Thanks for quick reply. It works in item doctype but it didn’t work for supplier doctype.
I want credit days in supplier autocomplete list but i can’t fetch credit days in supplier autocomplete list.
SO please assist me how would i get credit days in autocomplete list.
Please find attached screenshots.
Thanks,
Harsh Mehta
1 Like
rmehta
August 27, 2015, 11:33am
4
Thanks for the detailed explanation.
Sometimes there are custom queries in (queries.py) that do not honour search_fields. This needs to be fixed in the product.
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
import json
from collections import defaultdict
import frappe
from frappe import scrub
from frappe.desk.reportview import get_filters_cond, get_match_cond
from frappe.utils import nowdate, unique
import erpnext
from erpnext.stock.get_item_details import _get_item_tax_template
# searches for active employees
@frappe.whitelist()
@frappe.validate_and_sanitize_search_inputs
def employee_query(doctype, txt, searchfield, start, page_len, filters):
This file has been truncated. show original
Edit: added link
Hello,
@rmehta Thanks for quick reply.
I got credit days in autocomplete box by way you suggested. But i want to know which way supplier_query function of query.py file would be called from purchase order doctype .
Also i didn’t understand first line of supplier_query function. from where supp_master_name is set
eg : frappe.defaults.get_user_default(“supp_master_name”)
Also i have attached screenshot of supplier_query function.
So please assist me as i have to clear my doubts regarding autocomplete box
Thanks,
Harsh Mehta
rmehta
August 28, 2015, 3:45pm
6
If you have doubt you can also login to bench via your console and execute the line
bench --site [yoursite]
>>> import frappe.defaults
>>> frappe.defaults.get_user_default("supp_master_name")
Hi having the same issue but not finding the path
frappe/erpnext/blob/develop/erpnext/controllers/queries.py