Merge pull request #50535 from aerele/support-53360

fix: construct batch_nos and serial_nos to avoid NoneType error
This commit is contained in:
rohitwaghchaure
2025-11-17 16:24:20 +05:30
committed by GitHub
2 changed files with 3 additions and 0 deletions

View File

@@ -45,6 +45,7 @@ class TestStockReconciliation(FrappeTestCase, StockTestMixin):
def test_reco_for_moving_average(self):
self._test_reco_sle_gle("Moving Average")
@change_settings("Stock Settings", {"allow_negative_stock": 1})
def _test_reco_sle_gle(self, valuation_method):
item_code = self.make_item(properties={"valuation_method": valuation_method}).name

View File

@@ -2240,9 +2240,11 @@ def validate_reserved_stock(kwargs):
kwargs.ignore_voucher_nos = [kwargs.voucher_no]
if kwargs.serial_no:
kwargs.serial_nos = kwargs.serial_no.split("\n")
validate_reserved_serial_nos(kwargs)
elif kwargs.batch_no:
kwargs.batch_nos = [kwargs.batch_no]
validate_reserved_batch_nos(kwargs)
elif kwargs.serial_and_batch_bundle: