From ac9b0409f50048aa2b96cdba7a35cbcc6bb0d887 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 13 Aug 2025 12:24:44 +0530 Subject: [PATCH] fix: do not auto reserve serial/batch if SRE already has serial/batch set --- .../doctype/stock_reservation_entry/stock_reservation_entry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.py b/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.py index 5605417c186..17508cacf25 100644 --- a/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.py +++ b/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.py @@ -256,7 +256,7 @@ class StockReservationEntry(Document): and (self.get("_action") == "submit") and (self.has_serial_no or self.has_batch_no) and frappe.get_single_value("Stock Settings", "auto_reserve_serial_and_batch") - and not self.get("bypass_auto_reserve_serial_and_batch") + and not self.sb_entries ): from erpnext.stock.doctype.batch.batch import get_available_batches from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos_for_outward