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.
This commit is contained in:
Mihir Kandoi
2026-07-28 14:10:50 +05:30
parent 2f07dfc474
commit 632113c309

View File

@@ -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: {