From 2524af4758de4ad1730d4143e7f955772a98d2dd Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 19 Aug 2026 12:36:22 +0530 Subject: [PATCH] fix: new docs should refetch incoming rates (#58097) --- erpnext/controllers/selling_controller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index 970dd8e4b48..034256087e5 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -588,12 +588,12 @@ class SellingController(StockController): reset_incoming_rate() if ( - not d.incoming_rate + (not d.incoming_rate or self.is_new()) + and not is_standalone or self.is_internal_transfer() or ( get_valuation_method(d.item_code, self.company) == "Moving Average" and self.get("is_return") - and not is_standalone ) ): d.incoming_rate = get_incoming_rate(