From 59a710433a2add346737274e5dd23011e83a4825 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 23 Sep 2025 10:56:50 +0530 Subject: [PATCH] fix: warehouse for batch validation (cherry picked from commit 381072170a3a50915c7fa9f142304e192328c031) (cherry picked from commit cb94c4b5f189e3fed9fbbe508490fa6d177a6ab7) --- .../serial_and_batch_bundle/serial_and_batch_bundle.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.py b/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.py index cf46867d64e..35cdae457b8 100644 --- a/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.py +++ b/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.py @@ -774,7 +774,9 @@ class SerialandBatchBundle(Document): (parent.warehouse == self.warehouse) & (parent.voucher_type == "Stock Reconciliation") ) elif batches: - future_entries = future_entries.where(child.batch_no.isin(batches)) + future_entries = future_entries.where( + (child.batch_no.isin(batches)) & (parent.warehouse == self.warehouse) + ) future_entries = future_entries.run(as_dict=True)