mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-21 10:19:57 +00:00
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:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user