Merge pull request #31381 from barredterra/report-filters-from-route-options

feat: set report filters from route options
This commit is contained in:
Akhil Narang 2025-03-04 10:35:21 +05:30 committed by GitHub
commit 7cf7bf686f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -30,7 +30,11 @@ frappe.views.ReportView = class ReportView extends frappe.views.ListView {
this.report_doc = doc;
this.report_doc.json = JSON.parse(this.report_doc.json);
this.filters = this.report_doc.json.filters;
this.filters = [
...this.report_doc.json.filters,
...this.parse_filters_from_route_options(),
];
this.order_by = this.report_doc.json.order_by;
this.add_totals_row = this.report_doc.json.add_totals_row;
this.page_title = __(this.report_name);