perf: Caching in checking allowance for qty and amount

This commit is contained in:
Nabin Hait
2024-03-13 13:00:10 +05:30
parent d279e23623
commit 8d682fa884
2 changed files with 6 additions and 5 deletions

View File

@@ -1605,8 +1605,8 @@ class AccountsController(TransactionBase):
item_allowance = {}
global_qty_allowance, global_amount_allowance = None, None
role_allowed_to_over_bill = frappe.db.get_single_value(
"Accounts Settings", "role_allowed_to_over_bill"
role_allowed_to_over_bill = frappe.get_cached_value(
"Accounts Settings", None, "role_allowed_to_over_bill"
)
user_roles = frappe.get_roles()