From cf3cf2ca1fbcbb1678c25b1cb88769bbd43f8493 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 23 Nov 2015 15:10:42 +0530 Subject: [PATCH] [fix] Update exploded materials table from 'Update Cost' button --- erpnext/manufacturing/doctype/bom/bom.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index ff12c04e63..4b7f7f2bf7 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -124,22 +124,17 @@ class BOM(Document): if self.docstatus == 2: return - items_rate = frappe._dict() for d in self.get("items"): rate = self.get_bom_material_detail({'item_code': d.item_code, 'bom_no': d.bom_no, 'qty': d.qty})["rate"] if rate: d.rate = rate - items_rate.setdefault(d.item_code, d.rate) - - for e in self.get("exploded_items"): - if items_rate.get(e.item_code): - e.rate = items_rate.get(e.item_code) if self.docstatus == 1: self.flags.ignore_validate_update_after_submit = True self.calculate_cost() self.save() + self.update_exploded_items() frappe.msgprint(_("Cost Updated"))