Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Skip empty rows while updating unsaved BOM cost #28136

Merged
merged 1 commit into from
Oct 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion erpnext/manufacturing/doctype/bom/bom.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,9 @@ def update_cost(self, update_parent=True, from_child_bom=False, update_hour_rate
existing_bom_cost = self.total_cost

for d in self.get("items"):
if not d.item_code:
continue

rate = self.get_rm_rate({
"company": self.company,
"item_code": d.item_code,
Expand Down Expand Up @@ -599,7 +602,7 @@ def get_exploded_items(self):
for d in self.get('items'):
if d.bom_no:
self.get_child_exploded_items(d.bom_no, d.stock_qty)
else:
elif d.item_code:
self.add_to_cur_exploded_items(frappe._dict({
'item_code' : d.item_code,
'item_name' : d.item_name,
Expand Down