mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-14 12:25:09 +00:00
fix(bom): pass company warehouse filter
(cherry picked from commit 73bcfc4710)
This commit is contained in:
@@ -92,6 +92,10 @@ frappe.ui.form.on("BOM", {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
frm.events.set_company_filters(frm, "project");
|
||||||
|
frm.events.set_company_filters(frm, "default_source_warehouse");
|
||||||
|
frm.events.set_company_filters(frm, "default_target_warehouse");
|
||||||
|
|
||||||
frm.trigger("toggle_fields_for_semi_finished_goods");
|
frm.trigger("toggle_fields_for_semi_finished_goods");
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -104,6 +108,16 @@ frappe.ui.form.on("BOM", {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
set_company_filters: function (frm, fieldname) {
|
||||||
|
frm.set_query(fieldname, () => {
|
||||||
|
return {
|
||||||
|
filters: {
|
||||||
|
company: frm.doc.company,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
track_semi_finished_goods(frm) {
|
track_semi_finished_goods(frm) {
|
||||||
frm.trigger("toggle_fields_for_semi_finished_goods");
|
frm.trigger("toggle_fields_for_semi_finished_goods");
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user