From 632113c3096b57b66376513763fea3deefacefaf Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 28 Jul 2026 14:10:50 +0530 Subject: [PATCH] fix(setup): scope manufacturing warehouse filters to company Default WIP, Finished Goods and Scrap Warehouse fields on Company listed warehouses of every company. Filter them by the current company and exclude group warehouses, matching the other warehouse fields. --- erpnext/setup/doctype/company/company.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/erpnext/setup/doctype/company/company.js b/erpnext/setup/doctype/company/company.js index b1d75796c8f..50ff21b88ad 100644 --- a/erpnext/setup/doctype/company/company.js +++ b/erpnext/setup/doctype/company/company.js @@ -70,6 +70,17 @@ frappe.ui.form.on("Company", { }; }); + ["default_wip_warehouse", "default_fg_warehouse", "default_scrap_warehouse"].forEach((fieldname) => { + frm.set_query(fieldname, function (doc) { + return { + filters: { + company: doc.name, + is_group: 0, + }, + }; + }); + }); + frm.set_query("default_letter_head", function () { return { filters: {