This commit is contained in:
younes 2025-06-19 12:15:37 +01:00
parent fbe438279d
commit 8bd5826049
1 changed files with 7 additions and 2 deletions

View File

@ -23,8 +23,13 @@ class BaseModel(models.AbstractModel):
hidden_field_names = []
try:
if 'remove_from_custom_filter' not in self.env['hide.field']._fields:
return hidden_field_names
field_exists = self.env['ir.model.fields'].sudo().search_count([
('model', '=', 'hide.field'),
('name', '=', 'remove_from_custom_filter'),
]) > 0
if not field_exists:
return []
# Get hide field records for current model and user
hide_field_recs = self.env['hide.field'].sudo().search([