Hide fields from advanced search

This commit is contained in:
younes 2025-06-17 15:59:50 +01:00
parent 7c3ed939b8
commit 177e51dbaf
3 changed files with 4 additions and 4 deletions

View File

@ -15,5 +15,5 @@ class hide_field(models.Model):
readonly = fields.Boolean('Read-Only', help="Selected Field will be Read only in selected model from the defined users.")
required = fields.Boolean('Required', help="Selected Field will be set as required for selected model from the defined users.")
external_link = fields.Boolean('Remove External Link',help="External Link will be hidden for relational fields in selected model from the defined users.")
remove_from_custom_filter = fields.Boolean('Remove From Custom Filter',
help="Hide this field from the filter/group-by dropdown in the search view.")
# remove_from_custom_filter = fields.Boolean('Remove From Custom Filter',
# help="Hide this field from the filter/group-by dropdown in the search view.")

View File

@ -29,8 +29,8 @@ class BaseModel(models.AbstractModel):
('access_management_id.user_ids', 'in', self.env.user.id),
('access_management_id.active', '=', True),
('model_id.model', '=', model_name),
('remove_from_custom_filter', '=', True),
])
# ('remove_from_custom_filter', '=', True),
for hide_field_rec in hide_field_recs:
for field in hide_field_rec.field_id:

View File

@ -144,7 +144,7 @@
attrs="{'column_invisible' : [('parent.readonly','=',True)]}"/>
<field name="required" width='10'/>
<field name="external_link" width='10'/>
<field name="remove_from_custom_filter" width='10'/>
<!-- <field name="remove_from_custom_filter" width='10'/>-->
</tree>
</field>
<p role="alert"