<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/web/static/tests/control_panel/control_panel_tests.js, branch 14.0</title>
<subtitle>The current checkout of upstream Odoo</subtitle>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/'/>
<entry>
<title>[FIX] web: default operators for search fields</title>
<updated>2020-07-31T08:04:57+00:00</updated>
<author>
<name>Mathieu Duckerts-Antoine</name>
<email>dam@odoo.com</email>
</author>
<published>2020-07-23T08:13:39+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=dc8973fd6e44975fc79af184282434b0aa1c11aa'/>
<id>dc8973fd6e44975fc79af184282434b0aa1c11aa</id>
<content type='text'>
During the refactoring of the control panel (https://github.com/odoo/odoo/pull/41268)
a regression concerning the operator used for the fields set as
search_default was introduced: the default operator was fixed to '='
while it would have been necessary to take into consideration the
optional 'operator' attribute or the field types. Moreover, the default
operator associated to many2one fields when using autocompletion was
also mistakenly set to 'ilike' instead of '='. The present commit
restores the previous behavior.

closes odoo/odoo#55099

X-original-commit: 1f8e93fc590a6c7ef6b93953058f2dcd643ac620
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
Co-authored-by: Julien Mougenot &lt;jum@odoo.com&gt;
Co-authored-by: Mathieu Duckerts-Antoine &lt;dam@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
During the refactoring of the control panel (https://github.com/odoo/odoo/pull/41268)
a regression concerning the operator used for the fields set as
search_default was introduced: the default operator was fixed to '='
while it would have been necessary to take into consideration the
optional 'operator' attribute or the field types. Moreover, the default
operator associated to many2one fields when using autocompletion was
also mistakenly set to 'ilike' instead of '='. The present commit
restores the previous behavior.

closes odoo/odoo#55099

X-original-commit: 1f8e93fc590a6c7ef6b93953058f2dcd643ac620
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
Co-authored-by: Julien Mougenot &lt;jum@odoo.com&gt;
Co-authored-by: Mathieu Duckerts-Antoine &lt;dam@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] *: adapt tests to Owl search panel</title>
<updated>2020-07-23T08:21:10+00:00</updated>
<author>
<name>Julien Mougenot</name>
<email>jum@odoo.com</email>
</author>
<published>2020-07-13T13:20:46+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=d3dd7b24b0ed55b02479f54f2320781f4f6297bc'/>
<id>d3dd7b24b0ed55b02479f54f2320781f4f6297bc</id>
<content type='text'>
Adaptation of the tests to the changes regarding the refactored search
panel and model.

Part of task 2228968

Co-authored-by: Julien Mougenot &lt;jum@odoo.com&gt;
Co-authored-by: Mathieu Duckerts-Antoine &lt;dam@odoo.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adaptation of the tests to the changes regarding the refactored search
panel and model.

Part of task 2228968

Co-authored-by: Julien Mougenot &lt;jum@odoo.com&gt;
Co-authored-by: Mathieu Duckerts-Antoine &lt;dam@odoo.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: do no try to render filters referencing access restricted fields</title>
<updated>2020-07-06T09:40:09+00:00</updated>
<author>
<name>Xavier ALT</name>
<email>xal@odoo.com</email>
</author>
<published>2020-06-30T11:31:15+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=2479da0176280d723a5c6f5de1f3be2b77dfb51f'/>
<id>2479da0176280d723a5c6f5de1f3be2b77dfb51f</id>
<content type='text'>
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
&lt;search string="My Model"&gt;
    &lt;filter name="group_myfield" context="{'group_by': 'my_field'}"/&gt;
&lt;/search&gt;
```

This commit ensure those filter are correctly discarded.

OPW-2284621

closes odoo/odoo#54112

X-original-commit: b3452a1863c36290b13e16161e2703d9a3737f0e
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
&lt;search string="My Model"&gt;
    &lt;filter name="group_myfield" context="{'group_by': 'my_field'}"/&gt;
&lt;/search&gt;
```

This commit ensure those filter are correctly discarded.

OPW-2284621

closes odoo/odoo#54112

X-original-commit: b3452a1863c36290b13e16161e2703d9a3737f0e
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: in search view, use modifiers to determine if filter is invisible</title>
<updated>2020-06-25T15:01:29+00:00</updated>
<author>
<name>Xavier ALT</name>
<email>xal@odoo.com</email>
</author>
<published>2020-06-10T23:57:42+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=19033e804ec243c593c9549a3f0024fbf2230ab1'/>
<id>19033e804ec243c593c9549a3f0024fbf2230ab1</id>
<content type='text'>
In search view, the "invisible" attribute can use complex expression,
and so we must rely on the "modifiers" attribute set by the ir.ui.view
post-processing to determine if a  filter should be invisible or not.

For example, considering the context {'hide_myfilter': False}, the
following view:

```xml
&lt;search&gt;
   ...
   &lt;filter name="myfilter" string="My Filter" invisible="context.get('hide_myfilter')"/&gt;
   ...
&lt;/search&gt;
```

Will be returned as such by the server:

```xml
&lt;search&gt;
   ...
   &lt;filter name="myfilter" string="My Filter" invisible="context.get('hide_myfilter')"
       modifiers="{&amp;quot;invisible&amp;quot;: false}"/&gt;
   ...
&lt;/search&gt;
```

After this commit, the filter "myfilter" will correctly be shown.

OPW-2243639

closes odoo/odoo#53690

X-original-commit: 00969326e24dadd9b3f6e026789a1e575dd1c8dc
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
Signed-off-by: Julien Mougenot (jum) &lt;jum@odoo.com&gt;
Signed-off-by: Xavier ALT &lt;xavieralt@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In search view, the "invisible" attribute can use complex expression,
and so we must rely on the "modifiers" attribute set by the ir.ui.view
post-processing to determine if a  filter should be invisible or not.

For example, considering the context {'hide_myfilter': False}, the
following view:

```xml
&lt;search&gt;
   ...
   &lt;filter name="myfilter" string="My Filter" invisible="context.get('hide_myfilter')"/&gt;
   ...
&lt;/search&gt;
```

Will be returned as such by the server:

```xml
&lt;search&gt;
   ...
   &lt;filter name="myfilter" string="My Filter" invisible="context.get('hide_myfilter')"
       modifiers="{&amp;quot;invisible&amp;quot;: false}"/&gt;
   ...
&lt;/search&gt;
```

After this commit, the filter "myfilter" will correctly be shown.

OPW-2243639

closes odoo/odoo#53690

X-original-commit: 00969326e24dadd9b3f6e026789a1e575dd1c8dc
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
Signed-off-by: Julien Mougenot (jum) &lt;jum@odoo.com&gt;
Signed-off-by: Xavier ALT &lt;xavieralt@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: do not use groupbys in views not groupable</title>
<updated>2020-05-11T13:40:10+00:00</updated>
<author>
<name>Mohammed Shekha</name>
<email>msh@odoo.com</email>
</author>
<published>2020-02-21T10:32:14+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=c28244e4b256c3858ea9fefa3a536907876737fa'/>
<id>c28244e4b256c3858ea9fefa3a536907876737fa</id>
<content type='text'>
Before this commit: A problem occurs with kanban views that are not
groupable (i.e. for which searchMenuTypes does not contain 'groupBy'):
if the action has a default groupby (set in Studio for instance) then
it is still applied and causes crashes. That happens in the documents
kanban view for instance.
More generally, if a view is not groupable, some information on groupbys
can appear in the interface (in a facet) while not used/useful
for the view.

After this commit:
    - if a kanban view is not groupable, a default groupby will never be
     applied.

    - if a view is not groupable, we ensures that
        - the search query generated in the control panel has
          groupBy = [],
        - groupbys cannot be represented in a facet.

closes odoo/odoo#51041

X-original-commit: 91c80291e90127792623476d8997fd2a67569170
Signed-off-by: Damien Bouvy (dbo) &lt;dbo@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before this commit: A problem occurs with kanban views that are not
groupable (i.e. for which searchMenuTypes does not contain 'groupBy'):
if the action has a default groupby (set in Studio for instance) then
it is still applied and causes crashes. That happens in the documents
kanban view for instance.
More generally, if a view is not groupable, some information on groupbys
can appear in the interface (in a facet) while not used/useful
for the view.

After this commit:
    - if a kanban view is not groupable, a default groupby will never be
     applied.

    - if a view is not groupable, we ensures that
        - the search query generated in the control panel has
          groupBy = [],
        - groupbys cannot be represented in a facet.

closes odoo/odoo#51041

X-original-commit: 91c80291e90127792623476d8997fd2a67569170
Signed-off-by: Damien Bouvy (dbo) &lt;dbo@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[REF] web: Control panel tests</title>
<updated>2020-03-13T14:08:33+00:00</updated>
<author>
<name>Julien Mougenot</name>
<email>jum@odoo.com</email>
</author>
<published>2020-03-11T09:38:29+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=bb8eb766a84b9fd06007d3fb4ab9a29b70097738'/>
<id>bb8eb766a84b9fd06007d3fb4ab9a29b70097738</id>
<content type='text'>
Use of the new helpers in control panel (and subcomponents) tests and addition
of new tests.

Part of task 2196029

Co-authored-by: Mathieu Duckerts-Antoine &lt;dam@odoo.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use of the new helpers in control panel (and subcomponents) tests and addition
of new tests.

Part of task 2196029

Co-authored-by: Mathieu Duckerts-Antoine &lt;dam@odoo.com&gt;</pre>
</div>
</content>
</entry>
</feed>
