Merge pull request #6974 from netchampfaris/fix-custom-report-filters
fix: Report filters in Custom Reports
This commit is contained in:
commit
052b0b7bb7
2 changed files with 12 additions and 2 deletions
|
|
@ -304,8 +304,10 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList {
|
|||
if (frappe.route_options) {
|
||||
this.filters = this.parse_filters_from_route_options();
|
||||
|
||||
return this.filter_area.clear(false)
|
||||
.then(() => this.filter_area.set(this.filters));
|
||||
if (this.filters.length > 0) {
|
||||
return this.filter_area.clear(false)
|
||||
.then(() => this.filter_area.set(this.filters));
|
||||
}
|
||||
}
|
||||
|
||||
return Promise.resolve();
|
||||
|
|
|
|||
|
|
@ -68,6 +68,14 @@ frappe.views.ReportView = class ReportView extends frappe.views.ListView {
|
|||
});
|
||||
}
|
||||
|
||||
before_refresh() {
|
||||
if (this.report_doc) {
|
||||
// don't parse frappe.route_options if this is a Custom Report
|
||||
return Promise.resolve();
|
||||
}
|
||||
return super.before_refresh();
|
||||
}
|
||||
|
||||
before_render() {
|
||||
if (this.report_doc) {
|
||||
this.set_dirty_state_for_custom_report();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue