fix(stock): ignore current voucher in reserved stock validation

(cherry picked from commit 0e7f9711e1)
This commit is contained in:
Kavin
2025-11-10 14:28:37 +05:30
committed by Mergify
parent 2863b0fe52
commit 9d2c456668

View File

@@ -2235,6 +2235,10 @@ def get_future_sle_with_negative_batch_qty(sle_args):
def validate_reserved_stock(kwargs):
# ignore current voucher when validating the reserved stock
if not kwargs.ignore_voucher_nos and kwargs.voucher_no:
kwargs.ignore_voucher_nos = [kwargs.voucher_no]
if kwargs.serial_no:
validate_reserved_serial_nos(kwargs)