From 6b35c51ff1dfd974db5865ff93c4e421a9d0e654 Mon Sep 17 00:00:00 2001 From: Jatin3128 Date: Tue, 11 Aug 2026 15:35:28 +0530 Subject: [PATCH] refactor: move RFQ supplier disabled filter to link_filters Static filters with no doc-dependent values belong on the field definition, not in JS. Matches the existing pattern used for Warehouse/Item link_filters elsewhere (e.g. job_card_item.json, product_bundle_item.json). --- .../doctype/request_for_quotation/request_for_quotation.js | 4 ---- .../request_for_quotation_supplier.json | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js index 567fc9ba685..33e09c00de2 100644 --- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js +++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js @@ -22,10 +22,6 @@ frappe.ui.form.on("Request for Quotation", { }; }; - frm.set_query("supplier", "suppliers", function () { - return { filters: { disabled: 0 } }; - }); - frm.set_query("warehouse", "items", () => ({ filters: { company: frm.doc.company, diff --git a/erpnext/buying/doctype/request_for_quotation_supplier/request_for_quotation_supplier.json b/erpnext/buying/doctype/request_for_quotation_supplier/request_for_quotation_supplier.json index 34ce6200db2..2242aa82c5f 100644 --- a/erpnext/buying/doctype/request_for_quotation_supplier/request_for_quotation_supplier.json +++ b/erpnext/buying/doctype/request_for_quotation_supplier/request_for_quotation_supplier.json @@ -40,6 +40,7 @@ "fieldtype": "Link", "in_list_view": 1, "label": "Supplier", + "link_filters": "[[\"Supplier\",\"disabled\",\"=\",0]]", "options": "Supplier", "reqd": 1 },