fix: don't attempt to create SABB for non-serialized / non-batch items (#56627)

* fix: don't attempt to create SABB for non-serialized / non-batch items

* fix(stock): skip serial batch lookup for rows without item code
This commit is contained in:
Raffael Meyer
2026-07-02 14:33:26 +02:00
committed by GitHub
parent 7229957107
commit 5b738b7b0d

View File

@@ -176,6 +176,10 @@ class SerialBatchBundleService:
parent_details = self.get_parent_details_for_packed_items()
for row in self.doc.get(table_name):
item_code = row.get("rm_item_code") or row.get("item_code")
if not item_code or not self.is_serial_batch_item(item_code):
continue
if (
not via_landed_cost_voucher
and row.serial_and_batch_bundle