From 2e76b9f9db51b70341bbbdeeeb43bfbd6675abd4 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 25 Jun 2024 18:11:41 +0530 Subject: [PATCH] fix: timeout while cancelling LCV (backport #42030) (#42031) fix: timeout while cancelling LCV (#42030) fix: timeout while canelling LCV (cherry picked from commit 21bf7fd1f8c9d4c1cd9f3b419089782e82658165) Co-authored-by: rohitwaghchaure --- erpnext/stock/stock_ledger.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index cc4f3043e93..f6091b56df5 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -1794,6 +1794,7 @@ def get_next_stock_reco(kwargs): sle.actual_qty, sle.has_batch_no, ) + .force_index("item_warehouse") .where( (sle.item_code == kwargs.get("item_code")) & (sle.warehouse == kwargs.get("warehouse"))