fix bug
This commit is contained in:
parent
fbe438279d
commit
8bd5826049
|
|
@ -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([
|
||||
|
|
|
|||
Loading…
Reference in New Issue