From d224bf1d3450ab0d63627f19b7f707074d8a1716 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Mon, 30 May 2022 10:33:58 +0530 Subject: [PATCH] fix: only erase BOM when do_not_explode is set --- erpnext/manufacturing/doctype/bom/bom.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 220ce1dbd8..3560c32166 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -251,9 +251,8 @@ class BOM(WebsiteGenerator): 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( {