Till now we used to toggle 'selectable' property of fields to manage what fields are shown in the 'Add Custom Filter' fields list. But seems like in Odoo 15 this property isn't controlling this feature anymore! Anybody else faced the issue? Is there any other way we can do the same now?
res[field]['selectable'] = False # to hide in Add Custom filter view res[field]['sortable'] = False # to hide in group by view res[field]['exportable'] = False # to hide in export list res[field]['store'] = False # to hide in 'Select Columns' filter in tree views
Thanks in advance
The selectable field in ir.model.fields still exists in odoo 15:
https://github.com/odoo/odoo/blame/15.0/odoo/addons/base/models/ir_model.py#L500
but setting this to false isn't hiding the field from custom filter list apparently
in fact only these properties are available for fields in fields_get function
{
'type': 'char',
'change_default': False,
'company_dependent': False,
'depends': (),
'manual': False,
'readonly': False,
'required': False,
'searchable': True,
'sortable': True,
'store': True,
'string': 'Email',
'translate': False,
'trim': True,
'name': 'submitted_email'
}
Dynamic Add Custom Filter Menu Visibility | Remove Add Custom Filter Menu | Disable Add Custom Filter Menu | Control Access by User Group
This module allows administrators to hide or show the "Add Custom Filter" menu based on user groups, ensuring that only authorized users can apply advanced search filters.
https://apps.odoo.com/apps/modules/16.0/mh_hide_add_custom_filter