<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/web/static/src/js/views/basic/basic_controller.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: 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: no more double discard dialog</title>
<updated>2020-09-09T11:41:51+00:00</updated>
<author>
<name>Dhruv Patel</name>
<email>dhp@odoo.com</email>
</author>
<published>2020-08-10T10:32:18+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=df37ce50e847e3489eb43d1ef6fc1bac6d6af333'/>
<id>df37ce50e847e3489eb43d1ef6fc1bac6d6af333</id>
<content type='text'>
This issue only occurred in community.
Steps to produce:
1) Create/Edit any record.
2) Change the menu using menu switcher
3) You will get the discard dialog at the instance and after some
   time it will also display another duplicate discard dialog.

So, we have one extra redundant discard dialog on menu switching.
It is working fine when we have dirty form and then click on the
breadcrumb or click on any internal child menu.

Task : 2312437

closes odoo/odoo#57343

Signed-off-by: Lucas Perais (lpe) &lt;lpe@odoo.com&gt;
Co-authored-by: Mohammed Shekha &lt;msh@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>
This issue only occurred in community.
Steps to produce:
1) Create/Edit any record.
2) Change the menu using menu switcher
3) You will get the discard dialog at the instance and after some
   time it will also display another duplicate discard dialog.

So, we have one extra redundant discard dialog on menu switching.
It is working fine when we have dirty form and then click on the
breadcrumb or click on any internal child menu.

Task : 2312437

closes odoo/odoo#57343

Signed-off-by: Lucas Perais (lpe) &lt;lpe@odoo.com&gt;
Co-authored-by: Mohammed Shekha &lt;msh@odoo.com&gt;
Co-authored-by: Aaron Bohy &lt;aab@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] web, base: action buttons in list's controlPanel</title>
<updated>2020-07-29T08:59:42+00:00</updated>
<author>
<name>Lucas Perais (lpe)</name>
<email>lpe@odoo.com</email>
</author>
<published>2020-07-23T08:46:39+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=49d9771c56d9d5652eca34285ade04cc1a303718'/>
<id>49d9771c56d9d5652eca34285ade04cc1a303718</id>
<content type='text'>
This commit introduces a new semantics to define action and method buttons
in the list view.
The aim of this feature is to be able to do some actions on selected records, or on the entire
records' domain with the help of buttons located in the controlPanel, much like the form view header buttons.

To define such buttons, one must add a `header` node in the list view's xml definition
```
&lt;tree&gt;
  &lt;header&gt;
    &lt;button type="action|object" name="actionId|methodName" string="button's text" context="{}"/&gt;
  &lt;/header&gt;
  &lt;field name="fieldName" /&gt;
&lt;/tree&gt;
```

task-2246383</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit introduces a new semantics to define action and method buttons
in the list view.
The aim of this feature is to be able to do some actions on selected records, or on the entire
records' domain with the help of buttons located in the controlPanel, much like the form view header buttons.

To define such buttons, one must add a `header` node in the list view's xml definition
```
&lt;tree&gt;
  &lt;header&gt;
    &lt;button type="action|object" name="actionId|methodName" string="button's text" context="{}"/&gt;
  &lt;/header&gt;
  &lt;field name="fieldName" /&gt;
&lt;/tree&gt;
```

task-2246383</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] web: disable keyboard navigation with sample data</title>
<updated>2020-06-22T13:04:01+00:00</updated>
<author>
<name>Julien Mougenot</name>
<email>jum@odoo.com</email>
</author>
<published>2020-06-19T07:06:32+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=6998452065044650665c5020e6b730aede690ec0'/>
<id>6998452065044650665c5020e6b730aede690ec0</id>
<content type='text'>
Previous commit introduces the sample data feature in list and
kanban views. When sample data is displayed, most parts of the
renderers can't be clicked on, to prevent the user from interacting
with sample records (e.g. to open a sample record in form view from
the list). This commit disables keyboard navigation as well, as
those sample records could still be accessed with the keyboard.

To do so, several refactorings have been done in views:
 - _giveFocus function added on controllers (so that we can hook
   on the moment where we want to focus the renderer, and prevent
   it in sample mode), it kind of replaces giveFocus of ActionMixin
   which wasn't use from the outside
 - updateRendererState -&gt; _updateRendererState as it is private
 - _setState function added on controllers, to have a hook when we
   set a new state (already existed, but only in kanban)
 - _renderView function moved from Basic to AbstractRenderer, so
  that we have a proper hook to deactivate clickable elements in
  sample mode

Task 2232801

X-original-commit: 4482a03fe2f083f4f44fc6eb76d90ae22afbff91</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previous commit introduces the sample data feature in list and
kanban views. When sample data is displayed, most parts of the
renderers can't be clicked on, to prevent the user from interacting
with sample records (e.g. to open a sample record in form view from
the list). This commit disables keyboard navigation as well, as
those sample records could still be accessed with the keyboard.

To do so, several refactorings have been done in views:
 - _giveFocus function added on controllers (so that we can hook
   on the moment where we want to focus the renderer, and prevent
   it in sample mode), it kind of replaces giveFocus of ActionMixin
   which wasn't use from the outside
 - updateRendererState -&gt; _updateRendererState as it is private
 - _setState function added on controllers, to have a hook when we
   set a new state (already existed, but only in kanban)
 - _renderView function moved from Basic to AbstractRenderer, so
  that we have a proper hook to deactivate clickable elements in
  sample mode

Task 2232801

X-original-commit: 4482a03fe2f083f4f44fc6eb76d90ae22afbff91</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] web: add support of "sample" attribute in views</title>
<updated>2020-06-22T13:04:01+00:00</updated>
<author>
<name>Jérémy Hennecart</name>
<email>jeh@odoo.com</email>
</author>
<published>2020-06-19T07:06:31+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=c7964657ecbbad278cec73cf231d7eef55b44347'/>
<id>c7964657ecbbad278cec73cf231d7eef55b44347</id>
<content type='text'>
With this commit, it is now possible to display sample (fake)
data in empty views, in the hope of easing user onboarding.
This can be enabled (in list and kanban views) with attribute
sample="1" on the arch root element. In this case, if there is
no data to display, sample data will be generated based on
heuristics (depending on field types and names). This can be
used in addition to the no content helper.

Task 2232801

X-original-commit: 7c8e627ff5029cb539d702705e5ce53d658c76ed
Co-authored-by: Aaron Bohy &lt;aab@odoo.com&gt;
Co-authored-by: Mathieu Duckerts-Antoine &lt;dam@odoo.com&gt;
Co-authored-by: Jérémy Hennecart &lt;jeh@odoo.com&gt;
Co-authored-by: Julien Mougenot &lt;jum@odoo.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With this commit, it is now possible to display sample (fake)
data in empty views, in the hope of easing user onboarding.
This can be enabled (in list and kanban views) with attribute
sample="1" on the arch root element. In this case, if there is
no data to display, sample data will be generated based on
heuristics (depending on field types and names). This can be
used in addition to the no content helper.

Task 2232801

X-original-commit: 7c8e627ff5029cb539d702705e5ce53d658c76ed
Co-authored-by: Aaron Bohy &lt;aab@odoo.com&gt;
Co-authored-by: Mathieu Duckerts-Antoine &lt;dam@odoo.com&gt;
Co-authored-by: Jérémy Hennecart &lt;jeh@odoo.com&gt;
Co-authored-by: Julien Mougenot &lt;jum@odoo.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] *: update notifications to optional title</title>
<updated>2020-06-12T09:01:50+00:00</updated>
<author>
<name>Julien Mougenot</name>
<email>jum@odoo.com</email>
</author>
<published>2020-06-12T09:01:44+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=c4786fccfd23360a02e442c48ae2fb9f1e70aa4c'/>
<id>c4786fccfd23360a02e442c48ae2fb9f1e70aa4c</id>
<content type='text'>
closes odoo/odoo#52826

Related: odoo/enterprise#11084
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#52826

Related: odoo/enterprise#11084
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: resquencing stop at first controller</title>
<updated>2020-05-27T16:56:19+00:00</updated>
<author>
<name>Nicolas Lempereur</name>
<email>nle@odoo.com</email>
</author>
<published>2020-05-25T14:41:42+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=9d40ec7d15898ee9f3d2a92c7264690586c35cd8'/>
<id>9d40ec7d15898ee9f3d2a92c7264690586c35cd8</id>
<content type='text'>
When a resequencing is done inside an object hierarchy of two
controllers, since 9b90d8727d we would call resquencing code one time
per controller.

So if for example we are in a list view inside a form view (eg. a
"Search More" modal in a form view) the resequencing would work for the
list view, but then cause traceback when it is handled by form view.

With this changeset, the first controller that get the event
`resequence_records` even gobbles it up.

Without change, added test fails because of original traceback:

  Cannot read property 'res_id' of undefined@ 202 ms
  Source:
   TypeError: Cannot read property 'res_id' of undefined
    at /web/static/src/js/views/basic/basic_controller.js:744:67
   ...

opw-2256818
closes #51827

closes odoo/odoo#52018

X-original-commit: eef4b99fdb9469c040af80d055933eda367b7b3d
Signed-off-by: Nicolas Lempereur (nle) &lt;nle@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a resequencing is done inside an object hierarchy of two
controllers, since 9b90d8727d we would call resquencing code one time
per controller.

So if for example we are in a list view inside a form view (eg. a
"Search More" modal in a form view) the resequencing would work for the
list view, but then cause traceback when it is handled by form view.

With this changeset, the first controller that get the event
`resequence_records` even gobbles it up.

Without change, added test fails because of original traceback:

  Cannot read property 'res_id' of undefined@ 202 ms
  Source:
   TypeError: Cannot read property 'res_id' of undefined
    at /web/static/src/js/views/basic/basic_controller.js:744:67
   ...

opw-2256818
closes #51827

closes odoo/odoo#52018

X-original-commit: eef4b99fdb9469c040af80d055933eda367b7b3d
Signed-off-by: Nicolas Lempereur (nle) &lt;nle@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] web: list and kanban: highlight create button</title>
<updated>2020-05-08T11:38:59+00:00</updated>
<author>
<name>Mohammed Shekha</name>
<email>msh@odoo.com</email>
</author>
<published>2020-04-20T09:36:05+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=051a094838e4f27df91d66498ac03a3bd7b86358'/>
<id>051a094838e4f27df91d66498ac03a3bd7b86358</id>
<content type='text'>
... when there is no data and user clicks anywhere in the no content
helper.

Task 2239617

Co-authored-by: Jinal Patel &lt;jip@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>
... when there is no data and user clicks anywhere in the no content
helper.

Task 2239617

Co-authored-by: Jinal Patel &lt;jip@odoo.com&gt;
Co-authored-by: Aaron Bohy &lt;aab@odoo.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] web: adapt delete feature to list selection changes</title>
<updated>2020-03-30T09:55:08+00:00</updated>
<author>
<name>Aaron Bohy</name>
<email>aab@odoo.com</email>
</author>
<published>2020-03-27T20:18:16+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=94583df492113211b5ab3afd9d5c25ae1fe30dba'/>
<id>94583df492113211b5ab3afd9d5c25ae1fe30dba</id>
<content type='text'>
Following the new selection feature in list views, this commit
adapts the delete action.

Part of task 2185145</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Following the new selection feature in list views, this commit
adapts the delete action.

Part of task 2185145</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] web: adapt (un)archive feature to list selection changes</title>
<updated>2020-03-30T09:55:08+00:00</updated>
<author>
<name>Aaron Bohy</name>
<email>aab@odoo.com</email>
</author>
<published>2020-03-27T09:56:50+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=8608a5ed8dc7d14432556d2c4c469e3f8deda7f1'/>
<id>8608a5ed8dc7d14432556d2c4c469e3f8deda7f1</id>
<content type='text'>
Following the new selection feature in list views, this commit
adapts the archive and unarchive actions.

Part of task 2185145</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Following the new selection feature in list views, this commit
adapts the archive and unarchive actions.

Part of task 2185145</pre>
</div>
</content>
</entry>
</feed>
