From 77d8d5b3e21441815bbc507a3fdb7c6e5040be36 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) (cherry picked from commit 33a066d56879e8e1ca9fb8bd535801bb36823151) --- 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 2a443e511b6..5ab77e1ddcb 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -464,6 +464,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: