From 6591e76a635aa6efe1214054e964a0fca1572004 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 11 Feb 2025 15:32:35 +0530 Subject: [PATCH] fix: dont update rate of free item on save --- erpnext/controllers/accounts_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 881fc786464..6619d01684a 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -823,7 +823,7 @@ class AccountsController(TransactionBase): and item.get("use_serial_batch_fields") ) ): - if fieldname == "batch_no" and not item.batch_no: + if fieldname == "batch_no" and not item.batch_no and not item.is_free_item: item.set("rate", ret.get("rate")) item.set("price_list_rate", ret.get("price_list_rate")) item.set(fieldname, value)