fix(manufacturing): update non-stock item dict (backport #53689) (#53698)

Co-authored-by: Sudharsanan Ashok <135326972+Sudharsanan11@users.noreply.github.com>
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
fix(manufacturing): update non-stock item dict (#53689)
This commit is contained in:
mergify[bot]
2026-03-23 10:26:29 +00:00
committed by GitHub
parent eaf5494502
commit c0ce34e12c

View File

@@ -1335,9 +1335,10 @@ def add_non_stock_items_cost(stock_entry, work_order, expense_account):
bom = frappe.get_doc("BOM", work_order.bom_no)
table = "exploded_items" if work_order.get("use_multi_level_bom") else "items"
items = {}
items = frappe._dict()
for d in bom.get(table):
items.setdefault(d.item_code, d.amount)
items.setdefault(d.item_code, 0)
items[d.item_code] += flt(d.amount)
non_stock_items = frappe.get_all(
"Item",