feat: deprecate get_customer_list (#34563)
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index ae4ff34..0cb35c1 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -275,7 +275,7 @@
before_tests = "erpnext.setup.utils.before_tests"
standard_queries = {
- "Customer": "erpnext.selling.doctype.customer.customer.get_customer_list",
+ "Customer": "erpnext.controllers.queries.customer_query",
}
doc_events = {
diff --git a/erpnext/selling/doctype/customer/customer.py b/erpnext/selling/doctype/customer/customer.py
index baa316f..944a0a6 100644
--- a/erpnext/selling/doctype/customer/customer.py
+++ b/erpnext/selling/doctype/customer/customer.py
@@ -448,8 +448,14 @@
@frappe.whitelist()
@frappe.validate_and_sanitize_search_inputs
def get_customer_list(doctype, txt, searchfield, start, page_len, filters=None):
+ from frappe.utils.deprecations import deprecation_warning
+
from erpnext.controllers.queries import get_fields
+ deprecation_warning(
+ "`get_customer_list` is deprecated and will be removed in version 15. Use `erpnext.controllers.queries.customer_query` instead."
+ )
+
fields = ["name", "customer_name", "customer_group", "territory"]
if frappe.db.get_default("cust_master_name") == "Customer Name":