From 845bbbc9e7eddf8ca44506ba2048a3e6b1259209 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 4511694d60..4085bc49cd 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -844,7 +844,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) -- GitLab