From 9f229d614ef02759f5220fb9a5c8ad64510e3149 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 1 Jul 2026 12:51:54 +0530 Subject: [PATCH] test(stock): fix Available Serial No fixture item-code case for Postgres setUp creates/receives/delivers the item as '_Test Item with Serial No' (lowercase w) but the report filter used '_Test Item With Serial No' (capital W). MariaDB's case-insensitive collation resolved it, but Postgres (case-sensitive) matched no item, so the report's 'if items:' guard dropped the item filter and returned serial-no rows for every item in the window -- an order-dependent, flaky count on Postgres. Align the filter to the created item's case (a no-op on MariaDB). Co-Authored-By: Claude Opus 4.8 --- .../report/available_serial_no/test_available_serial_no.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/report/available_serial_no/test_available_serial_no.py b/erpnext/stock/report/available_serial_no/test_available_serial_no.py index e9f478960d2..8d68d7d86c1 100644 --- a/erpnext/stock/report/available_serial_no/test_available_serial_no.py +++ b/erpnext/stock/report/available_serial_no/test_available_serial_no.py @@ -21,7 +21,7 @@ class TestStockLedgerReeport(ERPNextTestSuite): company="_Test Company", from_date=today(), to_date=add_days(today(), 30), - item_code="_Test Item With Serial No", + item_code="_Test Item with Serial No", ) def test_available_serial_no(self):