From e607795baed7544bcaedac031ed595b3a34eec4d Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 29 Nov 2024 15:49:18 +0530 Subject: [PATCH] fix: do not validate stock during inward (backport #44417) (#44427) fix: do not validate stock during inward (#44417) (cherry picked from commit d37d7b9811b8bd51f577004cfb89aefcab6d41cd) Co-authored-by: rohitwaghchaure --- .../doctype/serial_and_batch_bundle/serial_and_batch_bundle.py | 3 +++ 1 file changed, 3 insertions(+) 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 68c47b0d577..dc30039a8c0 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 @@ -972,6 +972,9 @@ class SerialandBatchBundle(Document): ): return + if self.voucher_type in ["Sales Invoice", "Delivery Note"] and self.type_of_transaction == "Inward": + return + if not self.has_batch_no: return