feat(minor): Add "in list view" fields in sort selector
This commit is contained in:
parent
5d2d9f6a25
commit
7fa9a3fd39
1 changed files with 6 additions and 2 deletions
|
|
@ -121,9 +121,13 @@ frappe.ui.SortSelector = class SortSelector {
|
|||
_options.push({'fieldname': meta.title_field});
|
||||
}
|
||||
|
||||
// bold or mandatory
|
||||
// add bold, mandatory and fields that are available in list view
|
||||
meta.fields.forEach(function(df) {
|
||||
if(df.mandatory || df.bold) {
|
||||
if (
|
||||
(df.mandatory || df.bold || df.in_list_view)
|
||||
&& frappe.model.is_value_type(df.fieldtype)
|
||||
&& frappe.perm.has_perm(me.doctype, df.permlevel, "read")
|
||||
) {
|
||||
_options.push({fieldname: df.fieldname, label: df.label});
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue