fix: only erase BOM when do_not_explode is set
diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py
index 220ce1d..3560c32 100644
--- a/erpnext/manufacturing/doctype/bom/bom.py
+++ b/erpnext/manufacturing/doctype/bom/bom.py
@@ -251,9 +251,8 @@
for item in self.get("items"):
self.validate_bom_currency(item)
- item.bom_no = ""
- if not item.do_not_explode:
- item.bom_no = item.bom_no
+ if item.do_not_explode:
+ item.bom_no = ""
ret = self.get_bom_material_detail(
{