From 83147e48e679f2a6c79db46960682433389c43f0 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). (cherry picked from commit 6b35c51ff1dfd974db5865ff93c4e421a9d0e654) --- .../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 96b197c4a9f..670231653cf 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 69d530da7ee..5862b8cde18 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 },