mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-21 14:09:19 +00:00
perf: Use client cached configuration (#47838)
These are accessed on every document load, reaching to DB is excessive.
This commit is contained in:
@@ -118,7 +118,7 @@ class AccountsController(TransactionBase):
|
|||||||
def onload(self):
|
def onload(self):
|
||||||
self.set_onload(
|
self.set_onload(
|
||||||
"make_payment_via_journal_entry",
|
"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():
|
if self.is_new():
|
||||||
|
|||||||
Reference in New Issue
Block a user