From f86c3f7f8b8bb0f54d3af45f20d0a7edb42c0aaf Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Mon, 2 Jun 2025 11:44:51 +0530 Subject: [PATCH] perf: Use client cached configuration (#47838) These are accessed on every document load, reaching to DB is excessive. --- 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 e9fbad9f991..a85787b6f62 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -118,7 +118,7 @@ class AccountsController(TransactionBase): def onload(self): self.set_onload( "make_payment_via_journal_entry", - frappe.db.get_single_value("Accounts Settings", "make_payment_via_journal_entry"), + frappe.client_cache.get_doc("Accounts Settings").make_payment_via_journal_entry, ) if self.is_new():