Merge pull request #3536 from expsa/kchy_dev_odex25_base

fix bug
This commit is contained in:
kchyounes19 2025-06-19 12:16:38 +01:00 committed by GitHub
commit 88644a5919
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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([