fix: add correct docview to use filters in sidebar item
This commit is contained in:
parent
da8bab771b
commit
c056cd00f8
1 changed files with 6 additions and 3 deletions
|
|
@ -54,10 +54,13 @@ frappe.ui.sidebar_item.TypeLink = class SidebarItem {
|
|||
tab: this.item.tab,
|
||||
};
|
||||
if (this.item.filters) {
|
||||
let filters_json = frappe.utils.get_filter_as_json(
|
||||
JSON.parse(this.item.filters)
|
||||
let filters_json = JSON.parse(
|
||||
frappe.utils.get_filter_as_json(JSON.parse(this.item.filters))
|
||||
);
|
||||
args.filters = filters_json;
|
||||
if (this.item.link_type == "DocType") {
|
||||
args.doc_view = "List";
|
||||
args.filters = filters_json;
|
||||
}
|
||||
}
|
||||
path = frappe.utils.generate_route(args);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue