[hotfix] ignore the disabled reports in sidebar Reports section (#4200)

This commit is contained in:
Makarand Bauskar 2017-09-28 12:12:16 +05:30 committed by Nabin Hait
parent 935680d160
commit d0fd1482c4

View file

@ -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: