<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/web/static/tests/views/list_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: 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>[IMP] web: list multi-edit: discard, cancel then save</title>
<updated>2021-02-17T07:31:31+00:00</updated>
<author>
<name>Mohammed Shekha</name>
<email>msh@odoo.com</email>
</author>
<published>2020-12-01T06:04:15+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=d37648944f9d9eeec470f7102c51ae56ba99dac6'/>
<id>d37648944f9d9eeec470f7102c51ae56ba99dac6</id>
<content type='text'>
In a list view that allows the multi edition, select several
records, edit a field, and 'click' on Discard. In the confirm
dialog, click on 'Cancel'. The row is still in edition and the
changes are still there. However, before this commit, clicking
on 'Save' did nothing.

The reason is that the 'Save' button is fake. Typically, clicking
on it triggers a 'field_changed' event, thus saving the selected
records. In this above scenario, the changes have already been
notified, so nothing happens when the user clicks on 'Save'.

This commit fixes the issue by storing the last 'field_changed'
event, and re-triggering it when necessary. This isn't the cleaner
way to handle that scenario, but it is the simpler, so we go for
it in stable. In master, it would be nice to rework the multi
edition feature with this scenario in mind.

task-2376233

closes odoo/odoo#66045

X-original-commit: 18ed619baeda06f071779da00177beee01f8a896
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 a list view that allows the multi edition, select several
records, edit a field, and 'click' on Discard. In the confirm
dialog, click on 'Cancel'. The row is still in edition and the
changes are still there. However, before this commit, clicking
on 'Save' did nothing.

The reason is that the 'Save' button is fake. Typically, clicking
on it triggers a 'field_changed' event, thus saving the selected
records. In this above scenario, the changes have already been
notified, so nothing happens when the user clicks on 'Save'.

This commit fixes the issue by storing the last 'field_changed'
event, and re-triggering it when necessary. This isn't the cleaner
way to handle that scenario, but it is the simpler, so we go for
it in stable. In master, it would be nice to rework the multi
edition feature with this scenario in mind.

task-2376233

closes odoo/odoo#66045

X-original-commit: 18ed619baeda06f071779da00177beee01f8a896
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: list: correctly evaluate groupby modifier with m2o</title>
<updated>2021-02-17T07:28:09+00:00</updated>
<author>
<name>Aaron Bohy</name>
<email>aab@odoo.com</email>
</author>
<published>2021-02-16T14:35:44+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=fa7a185663f21c1c4060765c8c137b296df3a350'/>
<id>fa7a185663f21c1c4060765c8c137b296df3a350</id>
<content type='text'>
Let's assume a &lt;groupby&gt; node in a list view containing a button
with an invisible modifier referencing a many2one field, e.g.

```
 &lt;tree&gt;
   &lt;groupby&gt;
     &lt;field name="m2o" invisible="1"/&gt;
     &lt;button string="do it" attrs="{'invisible': [('m2o', '=',
False)]}"/&gt;
   &lt;/groupby&gt;
 &lt;/tree&gt;
```

Before this commit, the m2o field was correctly read, but it's
value wasn't processed by the model, so the modifier wasn't
correctly evaluated.

Issue reported on PR https://github.com/odoo/odoo/pull/65316/

closes odoo/odoo#66287

X-original-commit: bbaeeb76bbef4ea371d3db5821af91bf1fe9ac4f
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>
Let's assume a &lt;groupby&gt; node in a list view containing a button
with an invisible modifier referencing a many2one field, e.g.

```
 &lt;tree&gt;
   &lt;groupby&gt;
     &lt;field name="m2o" invisible="1"/&gt;
     &lt;button string="do it" attrs="{'invisible': [('m2o', '=',
False)]}"/&gt;
   &lt;/groupby&gt;
 &lt;/tree&gt;
```

Before this commit, the m2o field was correctly read, but it's
value wasn't processed by the model, so the modifier wasn't
correctly evaluated.

Issue reported on PR https://github.com/odoo/odoo/pull/65316/

closes odoo/odoo#66287

X-original-commit: bbaeeb76bbef4ea371d3db5821af91bf1fe9ac4f
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: multiedit in a grouped list view: enable fetchBatchedM2O and References</title>
<updated>2021-02-15T09:44:04+00:00</updated>
<author>
<name>Lucas Perais (lpe)</name>
<email>lpe@odoo.com</email>
</author>
<published>2021-02-12T10:49:34+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=8b6e86927941dce2018ea93f191b59856ea67e4b'/>
<id>8b6e86927941dce2018ea93f191b59856ea67e4b</id>
<content type='text'>
Have grouped list with reference a m2o or a reference field

Select some records, edit them

Before this commit: the names of the reference fields and m2o disappeared

That was because the saveRecords function did not take into account a grouped list

manual forward port of #65999

After this commit: it works as expected

closes odoo/odoo#66043

closes odoo/odoo#66140

Signed-off-by: Lucas Perais (lpe) &lt;lpe@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Have grouped list with reference a m2o or a reference field

Select some records, edit them

Before this commit: the names of the reference fields and m2o disappeared

That was because the saveRecords function did not take into account a grouped list

manual forward port of #65999

After this commit: it works as expected

closes odoo/odoo#66043

closes odoo/odoo#66140

Signed-off-by: Lucas Perais (lpe) &lt;lpe@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: list multi edit: prevent force save</title>
<updated>2021-02-15T09:43:33+00:00</updated>
<author>
<name>Lucas Perais (lpe)</name>
<email>lpe@odoo.com</email>
</author>
<published>2021-02-12T15:16:39+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=23fcaeda6830f2dc0de17337f9c3da8faf0338ce'/>
<id>23fcaeda6830f2dc0de17337f9c3da8faf0338ce</id>
<content type='text'>
Have a list with multi_edit enabled
Have a widget boolean_toggle displayed on some field
Select some records to be in multi edit mode

Before this commit, the record on which the boolean toggle button was clicked was written
and then the multi edit feature was triggered and wrote on all the records
The first write is unnecessary and counter intuitive

After this commit, only the write with all the multi edited records is done</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Have a list with multi_edit enabled
Have a widget boolean_toggle displayed on some field
Select some records to be in multi edit mode

Before this commit, the record on which the boolean toggle button was clicked was written
and then the multi edit feature was triggered and wrote on all the records
The first write is unnecessary and counter intuitive

After this commit, only the write with all the multi edited records is done</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: list_test: an assert was not triggered, now it is</title>
<updated>2021-02-15T09:40:45+00:00</updated>
<author>
<name>Lucas Perais (lpe)</name>
<email>lpe@odoo.com</email>
</author>
<published>2021-02-11T15:56:31+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=e1fc6707ed4ddfe7c62e6beead8617e5fbe6ea9b'/>
<id>e1fc6707ed4ddfe7c62e6beead8617e5fbe6ea9b</id>
<content type='text'>
follows #59830</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
follows #59830</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: Show create button on multiEdit + unit test</title>
<updated>2021-01-28T15:23:07+00:00</updated>
<author>
<name>Achraf (abz)</name>
<email>abz@odoo.com</email>
</author>
<published>2021-01-06T10:14:05+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=813b9fc42f5d0cc4e35afb642291200b90d1f545'/>
<id>813b9fc42f5d0cc4e35afb642291200b90d1f545</id>
<content type='text'>
What are the steps to reproduce your issue ?

    1. Install project
    2. Open any project
    3. Switch to list view and display by Stage
    4. Open categoryA and select some records
    5. Open CategoryB

What is currently happening ?

    The button create is not displayed

What are you expecting to happen ?

    Don't hide create button

opw-2423701

closes odoo/odoo#64136

Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
What are the steps to reproduce your issue ?

    1. Install project
    2. Open any project
    3. Switch to list view and display by Stage
    4. Open categoryA and select some records
    5. Open CategoryB

What is currently happening ?

    The button create is not displayed

What are you expecting to happen ?

    Don't hide create button

opw-2423701

closes odoo/odoo#64136

Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: editable list: can unselect row</title>
<updated>2021-01-06T08:36:15+00:00</updated>
<author>
<name>Aaron Bohy</name>
<email>aab@odoo.com</email>
</author>
<published>2021-01-06T08:27:57+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=6be8997807e4fbfeeefe273a335d9182490d0ac5'/>
<id>6be8997807e4fbfeeefe273a335d9182490d0ac5</id>
<content type='text'>
Since commit [1], it is no longer possible to unselect a row in a
one2many editable list if there is an html field in the form view.
The reason is that there is a '.modal' element (several actually)
in the DOM of the html field. This element is considered as an
opened dialog by the list renderer, which is wrong. This commit
refines the selector that determines whether there is an opened
dialog or not.

[1] 7d04ec7cca4f355295a06c1ce6f112b6cc533c87

closes odoo/odoo#64127

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>
Since commit [1], it is no longer possible to unselect a row in a
one2many editable list if there is an html field in the form view.
The reason is that there is a '.modal' element (several actually)
in the DOM of the html field. This element is considered as an
opened dialog by the list renderer, which is wrong. This commit
refines the selector that determines whether there is an opened
dialog or not.

[1] 7d04ec7cca4f355295a06c1ce6f112b6cc533c87

closes odoo/odoo#64127

Signed-off-by: Géry Debongnie (ged) &lt;ged@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: list: keep line when click in m2o dropdown</title>
<updated>2021-01-05T11:26:42+00:00</updated>
<author>
<name>Mohammed Shekha</name>
<email>msh@odoo.com</email>
</author>
<published>2020-12-21T08:54:35+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=2ddb8e07ab9fcce3427266247069de8546a87fb5'/>
<id>2ddb8e07ab9fcce3427266247069de8546a87fb5</id>
<content type='text'>
Before this commit, in editable list views with a many2one, when
the user clicked inside the many2one dropdown, in the padding above
the first item or below the last item, the dropdown closed itself
and the row was removed (if it wasn't dirty yet). This commit fixes
that issue by ignoring clicks at those specific spots.

Task 2377864

closes odoo/odoo#63993

X-original-commit: dd40745dfdc98e82142e64ca58c0c976f6ad8d97
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before this commit, in editable list views with a many2one, when
the user clicked inside the many2one dropdown, in the padding above
the first item or below the last item, the dropdown closed itself
and the row was removed (if it wasn't dirty yet). This commit fixes
that issue by ignoring clicks at those specific spots.

Task 2377864

closes odoo/odoo#63993

X-original-commit: dd40745dfdc98e82142e64ca58c0c976f6ad8d97
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: fix optional dropdown hide behind listview table</title>
<updated>2021-01-05T11:13:39+00:00</updated>
<author>
<name>Mohammed Shekha</name>
<email>msh@odoo.com</email>
</author>
<published>2020-10-28T12:49:49+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=a14c74d926b35dc499914edcbb7b93e638fe3bce'/>
<id>a14c74d926b35dc499914edcbb7b93e638fe3bce</id>
<content type='text'>
before this commit: when you have o2m which has optional fields and optional
field dropdown is bigger and o2m does not have records and when you open
optional dropdown it hidden behind o2m table. The reason is optional dropdown
is child of table.

after this commit: put dropdown as child of listview.$el so it is no more child
of table so when it is opened it is displayed on top of listview table, here we
also have to calculate position of optional dropdown as it is no more child of
table element, so we have to set left position based on table width and if
language direction is rtl then dropdown width.

task-2370860
Closes #62681

closes odoo/odoo#63698

X-original-commit: c026b322dd0e22e86e82e917e722a9f579978b3a
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
before this commit: when you have o2m which has optional fields and optional
field dropdown is bigger and o2m does not have records and when you open
optional dropdown it hidden behind o2m table. The reason is optional dropdown
is child of table.

after this commit: put dropdown as child of listview.$el so it is no more child
of table so when it is opened it is displayed on top of listview table, here we
also have to calculate position of optional dropdown as it is no more child of
table element, so we have to set left position based on table width and if
language direction is rtl then dropdown width.

task-2370860
Closes #62681

closes odoo/odoo#63698

X-original-commit: c026b322dd0e22e86e82e917e722a9f579978b3a
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
