[Custom Script] Find BOM Parents of Item

I created a quick script that I think many people would find useful. It creates a custom button in the Item form which, when clicked, loads the list of BOMs that have the item as a child.

frappe.ui.form.on("Item",{
	refresh: function(frm) {
		
		frm.add_custom_button(__("Find Parent BOMs"), function(foo) {
			frappe.route_options = {'item_code': ['=', cur_frm.doc.item_code]};
			frappe.set_route("List", 'BOM');
		});
	}
});

Hopefully this is useful, and it would be very nice to have add this feature to the Item Dashboard (but I can’t figure out how to do it).

7 Likes

Great tool, thank you!

Very useful. I changed the name to “Where Used” in my implementation.

2 Likes