fix: Show report_hide fields in filter (#7690)

This commit is contained in:
Mangesh-Khairnar 2019-06-14 11:37:28 +05:30 committed by Faris Ansari
parent 2585c5270e
commit 7937b79d0e

View file

@ -112,7 +112,7 @@ frappe.ui.FieldSelect = Class.extend({
var main_table_fields = std_filters.concat(frappe.meta.docfield_list[me.doctype]);
$.each(frappe.utils.sort(main_table_fields, "label", "string"), function(i, df) {
// show fields where user has read access and if report hide flag is not set
if(frappe.perm.has_perm(me.doctype, df.permlevel, "read") && !df.report_hide)
if(frappe.perm.has_perm(me.doctype, df.permlevel, "read"))
me.add_field_option(df);
});
@ -122,7 +122,7 @@ frappe.ui.FieldSelect = Class.extend({
var child_table_fields = [].concat(frappe.meta.docfield_list[table_df.options]);
$.each(frappe.utils.sort(child_table_fields, "label", "string"), function(i, df) {
// show fields where user has read access and if report hide flag is not set
if(frappe.perm.has_perm(me.doctype, df.permlevel, "read") && !df.report_hide)
if(frappe.perm.has_perm(me.doctype, df.permlevel, "read"))
me.add_field_option(df);
});
}