feat(dashboard): Use caching decorator for dashboard
This commit is contained in:
parent
76158e6643
commit
1e0f9a2882
@ -6,12 +6,13 @@ from itertools import groupby
|
|||||||
from operator import itemgetter
|
from operator import itemgetter
|
||||||
import json
|
import json
|
||||||
import frappe
|
import frappe
|
||||||
|
from frappe.core.page.dashboard.dashboard import cache_source
|
||||||
from frappe.utils import add_to_date, date_diff, getdate, nowdate
|
from frappe.utils import add_to_date, date_diff, getdate, nowdate
|
||||||
from erpnext.accounts.report.general_ledger.general_ledger import execute
|
from erpnext.accounts.report.general_ledger.general_ledger import execute
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
|
@cache_source
|
||||||
def get(filters=None):
|
def get(filters=None):
|
||||||
filters = json.loads(filters)
|
|
||||||
timespan = filters.get("timespan")
|
timespan = filters.get("timespan")
|
||||||
timegrain = filters.get("timegrain")
|
timegrain = filters.get("timegrain")
|
||||||
account = filters.get("account")
|
account = filters.get("account")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user