Merge pull request #2200 from KanchanChauhan/diabled-report-hide-awesome-bar

Disabled reports will not be searchable from Awesome Bar
This commit is contained in:
Nabin Hait 2016-10-26 16:33:28 +05:30 committed by GitHub
commit b5def18aa8

View file

@ -278,16 +278,17 @@ frappe.search.verbs = [
frappe.search.find(keys(frappe.boot.user.all_reports), txt, function(match) {
var report = frappe.boot.user.all_reports[match];
var route = [];
if(report.report_type == "Report Builder")
route = ["Report", report.ref_doctype, match];
else
route = ["query-report", match];
if(!report.disabled)
if(report.report_type == "Report Builder")
route = ["Report", report.ref_doctype, match];
else
route = ["query-report", match];
return {
label: __("Report {0}", [__(match).bold()]),
value: __("Report {0}", [__(match)]),
route: route
}
return {
label: __("Report {0}", [__(match).bold()]),
value: __("Report {0}", [__(match)]),
route: route
}
});
},