From d269c90838d575542805b50e5370b5c43742d4bf Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 28 Jul 2026 12:31:15 +0530 Subject: [PATCH] fix(manufacturing): update cost of BOMs created via BOM Creator `calculate_rm_cost` skipped rate refresh whenever `bom_creator` was set, so neither the Update Cost button nor the BOM Update Tool could ever refresh those BOMs. Every BOM in a multi-level tree carries the field, so whole trees stayed frozen at their creation rates. The guard replaced the removed `rm_cost_as_per == "Manual"` check in 0b63dbf, on the assumption that BOM Creator rows hold manual rates. They do not: BOM Creator recomputes every row from `rm_cost_as_per` on save. --- erpnext/manufacturing/doctype/bom/services/costing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/bom/services/costing.py b/erpnext/manufacturing/doctype/bom/services/costing.py index 86ed2c97a9a..b72d1b8909d 100644 --- a/erpnext/manufacturing/doctype/bom/services/costing.py +++ b/erpnext/manufacturing/doctype/bom/services/costing.py @@ -225,7 +225,7 @@ class BOMCostingService: for d in self.doc.get("items"): old_rate = d.rate - if not self.doc.bom_creator and (d.is_stock_item or d.is_phantom_item): + if d.is_stock_item or d.is_phantom_item: d.rate = self.get_rm_rate(self._rm_rate_args(d), notify=False) self._set_item_amounts(d)