From c056cd00f8a9bb7ed597ae501c476166de708d02 Mon Sep 17 00:00:00 2001 From: sokumon Date: Thu, 8 Jan 2026 15:28:51 +0530 Subject: [PATCH] fix: add correct docview to use filters in sidebar item --- frappe/public/js/frappe/ui/sidebar/sidebar_item.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/frappe/public/js/frappe/ui/sidebar/sidebar_item.js b/frappe/public/js/frappe/ui/sidebar/sidebar_item.js index bc11eb3f54..6cd0f9d098 100644 --- a/frappe/public/js/frappe/ui/sidebar/sidebar_item.js +++ b/frappe/public/js/frappe/ui/sidebar/sidebar_item.js @@ -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); }