From eff9595e342facbbca804f8b4da56d28628b3b07 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 20 Jan 2026 17:12:31 +0530 Subject: [PATCH] perf: prevent duplicate reposting for the same item (cherry picked from commit 753593157183c0dcb7945255809c6d2c8be3f007) --- erpnext/stock/stock_ledger.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index 55e30258044..fd4ee19dbe7 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -752,7 +752,8 @@ class update_entries_after: self.distinct_item_warehouses[key] = val self.new_items_found = True elif ( - dependant_sle.actual_qty > 0 + self.via_landed_cost_voucher + and dependant_sle.actual_qty > 0 and dependant_sle.voucher_type == "Stock Entry" and is_transfer_stock_entry(dependant_sle.voucher_no) ):