fix: Report filters in Custom Reports
- frappe.route_options should not override Report Filters
This commit is contained in:
parent
e3be9b383f
commit
de1ced231d
2 changed files with 12 additions and 2 deletions
|
|
@ -290,8 +290,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