From 0742e6e19389c6883a789ef498bdee82ba930476 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Tue, 29 Oct 2024 15:35:19 +0530 Subject: [PATCH] fix: not able to submit stock entry (#43890) --- erpnext/stock/doctype/serial_no/serial_no.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/erpnext/stock/doctype/serial_no/serial_no.py b/erpnext/stock/doctype/serial_no/serial_no.py index 25932a3ad04..90d5c3201e6 100644 --- a/erpnext/stock/doctype/serial_no/serial_no.py +++ b/erpnext/stock/doctype/serial_no/serial_no.py @@ -335,11 +335,16 @@ def validate_serial_no(sle, item_det): if sr.work_order and work_order and sr.work_order == work_order: allow_existing_serial_no = True - if not allow_existing_serial_no and sle.voucher_type in [ - "Stock Entry", - "Purchase Receipt", - "Purchase Invoice", - ]: + if ( + not allow_existing_serial_no + and sle.voucher_type + in [ + "Stock Entry", + "Purchase Receipt", + "Purchase Invoice", + ] + and cint(sle.actual_qty) > 0 + ): msg = "" if sle.voucher_type == "Stock Entry":