From 277ba9cb794b1a979a9b3a59208f56679c20faf3 Mon Sep 17 00:00:00 2001 From: Sudharsanan11 Date: Sat, 7 Feb 2026 11:16:35 +0530 Subject: [PATCH] fix(stock): ignore pos reserved batches for stock levels --- .../serial_and_batch_bundle/serial_and_batch_bundle.py | 5 ++++- 1 file changed, 4 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 bd1e6902da0..554e8942eac 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 @@ -2689,7 +2689,10 @@ def get_auto_batch_nos(kwargs): available_batches = get_available_batches(kwargs) stock_ledgers_batches = get_stock_ledgers_batches(kwargs) - pos_invoice_batches = get_reserved_batches_for_pos(kwargs) + + pos_invoice_batches = frappe._dict() + if not kwargs.for_stock_levels: + pos_invoice_batches = get_reserved_batches_for_pos(kwargs) sre_reserved_batches = frappe._dict() if not kwargs.ignore_reserved_stock: