From d0fd1482c453c01ea54af87f43a0695ef0862472 Mon Sep 17 00:00:00 2001 From: Makarand Bauskar Date: Thu, 28 Sep 2017 12:12:16 +0530 Subject: [PATCH] [hotfix] ignore the disabled reports in sidebar Reports section (#4200) --- frappe/boot.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frappe/boot.py b/frappe/boot.py index 9f0c05a6ce..ef14445af5 100644 --- a/frappe/boot.py +++ b/frappe/boot.py @@ -138,8 +138,10 @@ def get_user_page_or_report(parent): and tab{parent}.name not in ( select `tabCustom Role`.{field} from `tabCustom Role` where `tabCustom Role`.{field} is not null) - """.format(parent=parent, column=column, - roles = ', '.join(['%s']*len(roles)), field=parent.lower()), roles, as_dict=True) + {condition} + """.format(parent=parent, column=column, roles = ', '.join(['%s']*len(roles)), + field=parent.lower(), condition="and tabReport.disabled=0" if parent == "Report" else ""), + roles, as_dict=True) for p in standard_roles: if p.name not in has_role: