From 33a066d56879e8e1ca9fb8bd535801bb36823151 Mon Sep 17 00:00:00 2001 From: Pandiyan P Date: Wed, 9 Sep 2026 18:04:10 +0530 Subject: [PATCH] fix(manufacturing): handle empty bom cost allocation (#58939) --- erpnext/manufacturing/doctype/bom/bom.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 25843fd7ae4..93ee04d0526 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -529,6 +529,7 @@ class BOM(WebsiteGenerator): doc.set_status(save=True) def set_fg_cost_allocation(self): + self.cost_allocation_per = flt(self.cost_allocation_per) total_secondary_items_per = 0 own_cost = 0 for item in self.secondary_items: