chore: Provision to ignore prepared report via route options (#22077)
This commit is contained in:
parent
274ffe8d68
commit
112836dcd7
2 changed files with 5 additions and 1 deletions
|
|
@ -201,7 +201,7 @@ def run(
|
|||
if sbool(are_default_filters) and report.custom_filters:
|
||||
filters = report.custom_filters
|
||||
|
||||
if report.prepared_report and not ignore_prepared_report and not custom_columns:
|
||||
if report.prepared_report and not sbool(ignore_prepared_report) and not custom_columns:
|
||||
if filters:
|
||||
if isinstance(filters, str):
|
||||
filters = json.loads(filters)
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList {
|
|||
// throttle refresh for 300ms
|
||||
this.refresh = frappe.utils.throttle(this.refresh, 300);
|
||||
|
||||
this.ignore_prepared_report = false;
|
||||
this.menu_items = [];
|
||||
}
|
||||
|
||||
|
|
@ -592,6 +593,8 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList {
|
|||
frappe.route_options = null;
|
||||
});
|
||||
|
||||
this.ignore_prepared_report = route_options["ignore_prepared_report"] || false;
|
||||
|
||||
return frappe.run_serially(promises);
|
||||
}
|
||||
}
|
||||
|
|
@ -639,6 +642,7 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList {
|
|||
args: {
|
||||
report_name: this.report_name,
|
||||
filters: filters,
|
||||
ignore_prepared_report: this.ignore_prepared_report,
|
||||
is_tree: this.report_settings.tree,
|
||||
parent_field: this.report_settings.parent_field,
|
||||
are_default_filters: are_default_filters,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue