fix(subcontracting): guard empty raw-material list before strict zip

`update_inward_order_received_items_for_manufacture` unpacks
`zip(*item_code_wh.keys(), strict=True)`. When the manufacture entry has no
raw-material rows (all rows are finished/secondary/scrap), `item_code_wh` is
empty and the unpack raises `ValueError: not enough values to unpack`.

Return early when there are no such rows, mirroring the `if secondary_items:`
guard already present in `update_inward_order_secondary_items`.
This commit is contained in:
Mihir Kandoi
2026-06-22 07:50:20 +05:30
parent 8218875733
commit 63c5dccb4b

View File

@@ -793,6 +793,9 @@ class SubcontractingInwardController:
for item in self.items
if not item.is_finished_item and not item.secondary_item_type and not item.is_legacy_scrap_item
]
if not items:
return
item_code_wh = frappe._dict(
{
(