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: