Skip to content
Snippets Groups Projects
Commit 2479da01 authored by Xavier ALT's avatar Xavier ALT
Browse files

[FIX] web: do no try to render filters referencing access restricted fields


In case a field is limited to specific groups on the model, those fields
are discarded from `fields_view_get()` but can still be referenced by some
filters on the search view causing a traceback (see #53797)

Model:

```python

class MyModel(models.Model):

  my_field = fields.Char(groups='base.group_system')
```

Search views:

```xml
<search string="My Model">
    <filter name="group_myfield" context="{'group_by': 'my_field'}"/>
</search>
```

This commit ensure those filter are correctly discarded.

OPW-2284621

closes odoo/odoo#54112

X-original-commit: b3452a1863c36290b13e16161e2703d9a3737f0e
Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
parent 37f54245
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment