From 25f7fa548d73019dbb59c5932cc84180204a8545 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 6 May 2026 14:24:43 +0530 Subject: [PATCH] fix: incorrect serial nos picked during disassemble --- erpnext/stock/doctype/stock_entry/stock_entry.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 3209190f110..08fd7b0483d 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -387,6 +387,9 @@ class StockEntry(StockController, SubcontractingInwardController): 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: