mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-25 04:53:01 +00:00
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).
This commit is contained in:
@@ -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", () => ({
|
frm.set_query("warehouse", "items", () => ({
|
||||||
filters: {
|
filters: {
|
||||||
company: frm.doc.company,
|
company: frm.doc.company,
|
||||||
|
|||||||
@@ -40,6 +40,7 @@
|
|||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Supplier",
|
"label": "Supplier",
|
||||||
|
"link_filters": "[[\"Supplier\",\"disabled\",\"=\",0]]",
|
||||||
"options": "Supplier",
|
"options": "Supplier",
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user