This commit is contained in:
younes 2025-06-18 15:03:42 +01:00
parent 3b95d6c2ab
commit 75ffcfc0b8
1 changed files with 4 additions and 4 deletions

View File

@ -23,8 +23,8 @@ class BaseModel(models.AbstractModel):
hidden_field_names = []
try:
# if 'remove_from_custom_filter' not in self.env['hide.field']._fields:
# return hidden_field_names
if 'remove_from_custom_filter' not in self.env['hide.field']._fields:
return hidden_field_names
# Get hide field records for current model and user
hide_field_recs = self.env['hide.field'].sudo().search([
@ -32,9 +32,9 @@ 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:
hidden_field_names.append(field.name)