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.

(cherry picked from commit 632113c309)

# Conflicts:
#	erpnext/setup/doctype/company/company.js
This commit is contained in:
Mihir Kandoi
2026-07-28 14:10:50 +05:30
parent feec193d7d
commit f05e8ed0ce

View File

@@ -69,6 +69,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,
},
};
});
});
},
company_name: function (frm) {