<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/web/static/tests, 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>[IMP] web: add findWhere utils</title>
<updated>2021-05-28T13:29:21+00:00</updated>
<author>
<name>Bruno Boi</name>
<email>boi@odoo.com</email>
</author>
<published>2021-05-17T11:10:10+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=9cdde27e25b13714e24082a50673454693c954ef'/>
<id>9cdde27e25b13714e24082a50673454693c954ef</id>
<content type='text'>
closes odoo/odoo#70936

Taskid: 2412172
Related: odoo/enterprise#18366
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
closes odoo/odoo#70936

Taskid: 2412172
Related: odoo/enterprise#18366
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: allow custom filters by ID interval</title>
<updated>2021-05-28T13:37:52+00:00</updated>
<author>
<name>Ivan Yelizariev</name>
<email>iel@odoo.com</email>
</author>
<published>2021-05-10T12:19:20+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=96b102cce95d6ed1bb6a66c17e0d39f96b05459f'/>
<id>96b102cce95d6ed1bb6a66c17e0d39f96b05459f</id>
<content type='text'>
Infinite number of records cannot be exported, so after some limit we will get a
timeout error. If you need to export more records than that limit, you should be
able to filter records into batches. The easiest way to do it is making a
filter by ID:

```
[Y| ID Greater than 100000] [Y| ID less than or equal to 200000]
```

---

opw-2517946

closes odoo/odoo#71345

X-original-commit: 2e0127af0d283d1d9bdb033de356e2ddf0973cce
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
Signed-off-by: Ivan Yelizariev // IEL &lt;yelizariev@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Infinite number of records cannot be exported, so after some limit we will get a
timeout error. If you need to export more records than that limit, you should be
able to filter records into batches. The easiest way to do it is making a
filter by ID:

```
[Y| ID Greater than 100000] [Y| ID less than or equal to 200000]
```

---

opw-2517946

closes odoo/odoo#71345

X-original-commit: 2e0127af0d283d1d9bdb033de356e2ddf0973cce
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
Signed-off-by: Ivan Yelizariev // IEL &lt;yelizariev@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: fix crash on editable list view when moving over a RO field</title>
<updated>2021-05-21T07:10:35+00:00</updated>
<author>
<name>Anh Thao Pham (pta)</name>
<email>pta@odoo.com</email>
</author>
<published>2021-05-20T12:35:13+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=030edd35ec14c434f9598578530b5704ea1cc459'/>
<id>030edd35ec14c434f9598578530b5704ea1cc459</id>
<content type='text'>
This is a forward-port of commit https://github.com/odoo/odoo/commit/970387f91fea0cb47404612f7d519ffba2c9ad3b

In editable list view, moving to next cell using TAB key crash when the
following field is becoming read-only (i.e non-focusable) and an onchange()
event is triggered.

Consider an editable tree view like this:

&lt;form&gt;
   &lt;field name="o2m" onchange="1"&gt;
       &lt;tree&gt;
          &lt;field name="description"/&gt;
          &lt;field name="date" attrs="{'readonly': [('description', '!=', False)]}"/&gt;
          &lt;field name="type"/&gt;
       &lt;/tree&gt;
   &lt;/field&gt;
&lt;/form&gt;

1. Edit 'description'
2. Issue a TAB keypress before 'date' becomes read-only
It will crash while calling getSelectionRange() on an empty element.

opw-2523630

closes odoo/odoo#71122

X-original-commit: bd6ba50e073ffff0bd51b1a02d51260f09e36357
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
Signed-off-by: Anh Thao PHAM &lt;kitan191@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a forward-port of commit https://github.com/odoo/odoo/commit/970387f91fea0cb47404612f7d519ffba2c9ad3b

In editable list view, moving to next cell using TAB key crash when the
following field is becoming read-only (i.e non-focusable) and an onchange()
event is triggered.

Consider an editable tree view like this:

&lt;form&gt;
   &lt;field name="o2m" onchange="1"&gt;
       &lt;tree&gt;
          &lt;field name="description"/&gt;
          &lt;field name="date" attrs="{'readonly': [('description', '!=', False)]}"/&gt;
          &lt;field name="type"/&gt;
       &lt;/tree&gt;
   &lt;/field&gt;
&lt;/form&gt;

1. Edit 'description'
2. Issue a TAB keypress before 'date' becomes read-only
It will crash while calling getSelectionRange() on an empty element.

opw-2523630

closes odoo/odoo#71122

X-original-commit: bd6ba50e073ffff0bd51b1a02d51260f09e36357
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
Signed-off-by: Anh Thao PHAM &lt;kitan191@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: disale autofill on input elements</title>
<updated>2021-03-24T06:22:55+00:00</updated>
<author>
<name>Mohammed Shekha</name>
<email>msh@odoo.com</email>
</author>
<published>2021-03-24T06:22:55+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=9d6ef842902e9e192924fa0caba99514e1543352'/>
<id>9d6ef842902e9e192924fa0caba99514e1543352</id>
<content type='text'>
with this commit we disables autofill of autocomplete by setting
autocomplete=off, this was previously done in commit: 64293fbdb0a247f689c1b0b0c580d9ce577af510
but it was not working because we were setting autocomplete=none
it seems that none does not work all the time.

task-2462676

closes odoo/odoo#68271

Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
with this commit we disables autofill of autocomplete by setting
autocomplete=off, this was previously done in commit: 64293fbdb0a247f689c1b0b0c580d9ce577af510
but it was not working because we were setting autocomplete=none
it seems that none does not work all the time.

task-2462676

closes odoo/odoo#68271

Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: domain: (=)(i)like operators</title>
<updated>2021-05-17T13:18:13+00:00</updated>
<author>
<name>Aaron Bohy</name>
<email>aab@odoo.com</email>
</author>
<published>2021-05-17T12:49:25+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=44e185dbd6ddeda7cdcd76882fa0bd231e9d3f37'/>
<id>44e185dbd6ddeda7cdcd76882fa0bd231e9d3f37</id>
<content type='text'>
Before this commit, evaluating a domain containing a like/ilike
operator with an evaluation context in which the value was false
crashed.

Moreover, those operators were wrong w.r.t. the case sensitivity:
like was case insensitive, whereas ilike was case sensitive, and
both =like and =ilike were case insensitive.

This commit fixes thoses issues.

The first issue was spotted on our prod, as we tried to add an
invisible attrs in a form view, using the ilike operator (it thus
crashed in create mode).

The second issue was spotted while writting the test cases.

To the best of our knowledge, those operators aren't used in attrs
(for now), explaining why those issues haven't been found before.

closes odoo/odoo#70876

Signed-off-by: Géry Debongnie (ged) &lt;ged@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before this commit, evaluating a domain containing a like/ilike
operator with an evaluation context in which the value was false
crashed.

Moreover, those operators were wrong w.r.t. the case sensitivity:
like was case insensitive, whereas ilike was case sensitive, and
both =like and =ilike were case insensitive.

This commit fixes thoses issues.

The first issue was spotted on our prod, as we tried to add an
invisible attrs in a form view, using the ilike operator (it thus
crashed in create mode).

The second issue was spotted while writting the test cases.

To the best of our knowledge, those operators aren't used in attrs
(for now), explaining why those issues haven't been found before.

closes odoo/odoo#70876

Signed-off-by: Géry Debongnie (ged) &lt;ged@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: no error on single active_ids state load</title>
<updated>2021-05-03T16:06:05+00:00</updated>
<author>
<name>Philémon van Helden</name>
<email>pvh@odoo.com</email>
</author>
<published>2021-04-08T09:54:12+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=44b59d10d0ab6440b0a908f518c157a3d670627b'/>
<id>44b59d10d0ab6440b0a908f518c157a3d670627b</id>
<content type='text'>
In eg. 13.0 when refreshing sales analysis action of a product, we would
get an error because we have a single active_ids which is not expected
by the code.

With this commit, we use .toString() on the jQuery BBQ parsed active_ids
as it was done before 32b8cec5 refactoring (january 2018).

The added test with the fix fails with an error:

  TypeError: state.active_ids.split is not a function
  at Class.loadState (/web/static/src/js/chrome/action_manager_act_window.js)

opw-2471982

closes odoo/odoo#70279

X-original-commit: bf9a985f4b62cc6f1eef4f9fcca2a8dfbd453004
Signed-off-by: Nicolas Lempereur (nle) &lt;nle@odoo.com&gt;
Signed-off-by: pvh-odoo &lt;SwagSamaSempai@users.noreply.github.com&gt;
Co-authored-by: Nicolas Lempereur &lt;nle@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In eg. 13.0 when refreshing sales analysis action of a product, we would
get an error because we have a single active_ids which is not expected
by the code.

With this commit, we use .toString() on the jQuery BBQ parsed active_ids
as it was done before 32b8cec5 refactoring (january 2018).

The added test with the fix fails with an error:

  TypeError: state.active_ids.split is not a function
  at Class.loadState (/web/static/src/js/chrome/action_manager_act_window.js)

opw-2471982

closes odoo/odoo#70279

X-original-commit: bf9a985f4b62cc6f1eef4f9fcca2a8dfbd453004
Signed-off-by: Nicolas Lempereur (nle) &lt;nle@odoo.com&gt;
Signed-off-by: pvh-odoo &lt;SwagSamaSempai@users.noreply.github.com&gt;
Co-authored-by: Nicolas Lempereur &lt;nle@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: make test pass on chrome 90</title>
<updated>2021-04-28T12:29:32+00:00</updated>
<author>
<name>Aaron Bohy</name>
<email>aab@odoo.com</email>
</author>
<published>2021-04-28T07:42:30+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=9507af4a8b4e68c4873fb1f4cdc65aaa50a0f1a6'/>
<id>9507af4a8b4e68c4873fb1f4cdc65aaa50a0f1a6</id>
<content type='text'>
The changed test uses the drag&amp;drop helper, and an operation does
not work as expected with the given params on chrome 90. The runbot
currently uses chrome 80, so it is not an issue, but if your chrome
is up-to-date, and you try to run the test suite, this test would
fail.

closes odoo/odoo#70008

X-original-commit: 43994da9980e4133274984f720bb58f3546ea0f9
Signed-off-by: Géry Debongnie (ged) &lt;ged@openerp.com&gt;
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The changed test uses the drag&amp;drop helper, and an operation does
not work as expected with the given params on chrome 90. The runbot
currently uses chrome 80, so it is not an issue, but if your chrome
is up-to-date, and you try to run the test suite, this test would
fail.

closes odoo/odoo#70008

X-original-commit: 43994da9980e4133274984f720bb58f3546ea0f9
Signed-off-by: Géry Debongnie (ged) &lt;ged@openerp.com&gt;
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: properly unpatch session after each test</title>
<updated>2021-04-19T13:24:40+00:00</updated>
<author>
<name>Aaron Bohy</name>
<email>aab@odoo.com</email>
</author>
<published>2021-04-19T13:17:55+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=b7b83db88c61d7db87045d87b09d7348f3a8a9eb'/>
<id>b7b83db88c61d7db87045d87b09d7348f3a8a9eb</id>
<content type='text'>
Before this commit, `getTZOffset` and `user_has_group` weren't
correctly reset to their initial values after tests. As a
consequence tests executed afterwards might behave unexpectedly.

closes odoo/odoo#69485

Signed-off-by: Géry Debongnie (ged) &lt;ged@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before this commit, `getTZOffset` and `user_has_group` weren't
correctly reset to their initial values after tests. As a
consequence tests executed afterwards might behave unexpectedly.

closes odoo/odoo#69485

Signed-off-by: Géry Debongnie (ged) &lt;ged@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: onchange: send correct nested x2manys values</title>
<updated>2021-04-13T11:45:24+00:00</updated>
<author>
<name>Aaron Bohy</name>
<email>aab@odoo.com</email>
</author>
<published>2021-04-13T10:18:45+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=3f54ca3e29d1537f66c6a3b56494dc065d9230e9'/>
<id>3f54ca3e29d1537f66c6a3b56494dc065d9230e9</id>
<content type='text'>
Commit [1] recently fixed an issue with nested x2many fields and
onchanges: in some cases, all field values weren't sent to the
server as they should.

However, there is a small issue with this fix. We didn't correctly
apply the default value to option `changesOnly`: when not given,
it was considered false, whereas in this particular function it
should have been true.

It caused an issue in the following scenario:

Have a form view with an x2many field (say A) displayed as a list.
In the list, there is another x2many field (say B), and (whatever
its type) a field C with an onchange. When the user changes C, the
onchange is performed, and we send to the server the value of all
fields. In particular, in the row, we send the value for the
many2one field pointing to the main record (the inverse field of
the x2many relation). The value for that field is basically the
whole record, containing itself field A. For field A, the value is
a list of commands, and for the updated record, it is a command 1.
Before this commit, in the values sent for this command, field B
was the empty array, even if it wasn't empty.

This issue was reproducible in account.move, on an existing record
having already a line in invoice_line_ids (this is field A). In
that line, tax_ids (this is field B) must have a tax which is
included in the price. When changing the quantity of the product,
the subtotal wasn't correctly computed.

[1] https://github.com/odoo/odoo/commit/a8b43d02066b2299ac2f4b88056c37725e9ce6cd
opw~2489755

closes odoo/odoo#69167

Signed-off-by: Lucas Perais (lpe) &lt;lpe@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit [1] recently fixed an issue with nested x2many fields and
onchanges: in some cases, all field values weren't sent to the
server as they should.

However, there is a small issue with this fix. We didn't correctly
apply the default value to option `changesOnly`: when not given,
it was considered false, whereas in this particular function it
should have been true.

It caused an issue in the following scenario:

Have a form view with an x2many field (say A) displayed as a list.
In the list, there is another x2many field (say B), and (whatever
its type) a field C with an onchange. When the user changes C, the
onchange is performed, and we send to the server the value of all
fields. In particular, in the row, we send the value for the
many2one field pointing to the main record (the inverse field of
the x2many relation). The value for that field is basically the
whole record, containing itself field A. For field A, the value is
a list of commands, and for the updated record, it is a command 1.
Before this commit, in the values sent for this command, field B
was the empty array, even if it wasn't empty.

This issue was reproducible in account.move, on an existing record
having already a line in invoice_line_ids (this is field A). In
that line, tax_ids (this is field B) must have a tax which is
included in the price. When changing the quantity of the product,
the subtotal wasn't correctly computed.

[1] https://github.com/odoo/odoo/commit/a8b43d02066b2299ac2f4b88056c37725e9ce6cd
opw~2489755

closes odoo/odoo#69167

Signed-off-by: Lucas Perais (lpe) &lt;lpe@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: can update one2many with custom field widget</title>
<updated>2021-03-24T12:16:41+00:00</updated>
<author>
<name>Krzysztof Magusiak</name>
<email>chris.magusiak@gmail.com</email>
</author>
<published>2021-03-22T10:25:58+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=3826a2645b94e0f62c719814c4dbe4cc6502e1f2'/>
<id>3826a2645b94e0f62c719814c4dbe4cc6502e1f2</id>
<content type='text'>
One might design a custom field widget to display/interact with a
one2many field. Before this commit, if this field widget triggered
a field_changed event to update a related record, it crashed,
because the code assumed that there was a view associated with the
field.

Closes #68276
opw~2468238

closes odoo/odoo#68294

Signed-off-by: Lucas Perais (lpe) &lt;lpe@odoo.com&gt;
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
Co-authored-by: Aaron Bohy &lt;aab@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
One might design a custom field widget to display/interact with a
one2many field. Before this commit, if this field widget triggered
a field_changed event to update a related record, it crashed,
because the code assumed that there was a view associated with the
field.

Closes #68276
opw~2468238

closes odoo/odoo#68294

Signed-off-by: Lucas Perais (lpe) &lt;lpe@odoo.com&gt;
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
Co-authored-by: Aaron Bohy &lt;aab@odoo.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
