Merge pull request #21275 from 101v/new_dashbaorad_chart_for_query_report

This commit is contained in:
Shariq Ansari 2023-06-09 12:17:05 +05:30 committed by GitHub
commit 5fbdce888d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View file

@ -171,6 +171,7 @@ def get_script(report_name):
"script": render_include(script),
"html_format": html_format,
"execution_time": frappe.cache.hget("report_execution_time", report_name) or 0,
"filters": report.filters,
}

View file

@ -126,6 +126,13 @@ frappe.report_utils = {
.then((r) => {
frappe.dom.eval(r.script || "");
return frappe.after_ajax(() => {
if (
frappe.query_reports[report_name] &&
!frappe.query_reports[report_name].filter &&
r.filters
) {
return (frappe.query_reports[report_name].filters = r.filters);
}
return (
frappe.query_reports[report_name] &&
frappe.query_reports[report_name].filters