fix: incorrect serial nos picked during disassemble (backport #54757) (#54759)

fix: incorrect serial nos picked during disassemble

(cherry picked from commit 25f7fa548d)

Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
This commit is contained in:
mergify[bot]
2026-05-06 16:05:50 +05:30
committed by GitHub
parent da95f83686
commit 1e2a7196e5

View File

@@ -346,6 +346,9 @@ class StockEntry(StockController):
def _set_serial_batch_for_disassembly_from_available_materials(self):
available_materials = get_available_materials(self.work_order, self)
for row in self.items:
if row.serial_no or row.batch_no or row.serial_and_batch_bundle:
continue
warehouse = row.s_warehouse or row.t_warehouse
materials = available_materials.get((row.item_code, warehouse))
if not materials: