<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/web/static/src/js/views/form, 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: Allow user to add product Description with studio</title>
<updated>2021-05-11T08:01:26+00:00</updated>
<author>
<name>Achraf (abz)</name>
<email>abz@odoo.com</email>
</author>
<published>2021-05-07T08:07:46+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=96564dd64bdbd426ae87444fd75a822074a37fc0'/>
<id>96564dd64bdbd426ae87444fd75a822074a37fc0</id>
<content type='text'>
What are the steps to reproduce your issue ?

    1. From the product form, go to the website version, edit it to add tabs
    2. Using studio, add the field "Description for website" to a tab of the notebook
    3. Save, click Edit, go to the tab that has the field

What is currently happening ?

    Traceback:
    form_renderer.js:258 Uncaught (in promise) TypeError: Cannot read property 'querySelector' of undefined
        at Class.setLocalState (form_renderer.js:258)
        at Class.setLocalState (form_editor.js:131)
        at Class.prototype.&lt;computed&gt; [as setLocalState] (class.js:90)
        at view_editor_manager.js:184

What are you expecting to happen ?

    Correctly add product description without tracebacks

Why is this happening ?

    Because the number of tab is not equal to the number of pages

How to fix the bug ?

    Before accessing the element, check if it exists

opw-2378743

closes odoo/odoo#70513

Signed-off-by: Nicolas Lempereur (nle) &lt;nle@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. From the product form, go to the website version, edit it to add tabs
    2. Using studio, add the field "Description for website" to a tab of the notebook
    3. Save, click Edit, go to the tab that has the field

What is currently happening ?

    Traceback:
    form_renderer.js:258 Uncaught (in promise) TypeError: Cannot read property 'querySelector' of undefined
        at Class.setLocalState (form_renderer.js:258)
        at Class.setLocalState (form_editor.js:131)
        at Class.prototype.&lt;computed&gt; [as setLocalState] (class.js:90)
        at view_editor_manager.js:184

What are you expecting to happen ?

    Correctly add product description without tracebacks

Why is this happening ?

    Because the number of tab is not equal to the number of pages

How to fix the bug ?

    Before accessing the element, check if it exists

opw-2378743

closes odoo/odoo#70513

Signed-off-by: Nicolas Lempereur (nle) &lt;nle@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: correctly close confirm dialog</title>
<updated>2021-02-17T12:06:00+00:00</updated>
<author>
<name>Aaron Bohy</name>
<email>aab@odoo.com</email>
</author>
<published>2021-02-17T09:27:48+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=98f9cb4f692a15494cd8ef298673fe1c949c423c'/>
<id>98f9cb4f692a15494cd8ef298673fe1c949c423c</id>
<content type='text'>
Let's assume the following scenario:
 - have an action in target new (e.g. a form view)
 - in the dialog, have an action/object button with confirm
   attribute
 - when clicking on that button, a confirm dialog opens
 - if validated, the following action returned by the server
   is again an action in target new

Before this commit, the confirm dialog remained in the DOM.

This issue occurred because it's parent wasn't correctly set (wrong
use of `this`), so when the first dialog was destroyed, the confirm
dialog wasn't automatically destroyed in turn.

OPW~2440712

closes odoo/odoo#66345

X-original-commit: 2016fe31af970976775c9df160a31abfbec742ba
Signed-off-by: Jorge Pinna Puissant (jpp) &lt;jpp@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Let's assume the following scenario:
 - have an action in target new (e.g. a form view)
 - in the dialog, have an action/object button with confirm
   attribute
 - when clicking on that button, a confirm dialog opens
 - if validated, the following action returned by the server
   is again an action in target new

Before this commit, the confirm dialog remained in the DOM.

This issue occurred because it's parent wasn't correctly set (wrong
use of `this`), so when the first dialog was destroyed, the confirm
dialog wasn't automatically destroyed in turn.

OPW~2440712

closes odoo/odoo#66345

X-original-commit: 2016fe31af970976775c9df160a31abfbec742ba
Signed-off-by: Jorge Pinna Puissant (jpp) &lt;jpp@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: fix issue of notebook page with invisiblity modifier</title>
<updated>2021-02-17T11:00:19+00:00</updated>
<author>
<name>Mohammed Shekha</name>
<email>msh@odoo.com</email>
</author>
<published>2021-02-01T09:42:00+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=e695cb7c7d6eb989fd0540412d137410363a483f'/>
<id>e695cb7c7d6eb989fd0540412d137410363a483f</id>
<content type='text'>
before this commit: when there is only one page in the notebook tag and
there is a boolean field in form to show/hide that notebook page based on
invisibility attrs, if we toggle boolean field notebook hides, that's OK
but when we toggle boolean field again then notebook page is displayed but
it is not active and due to that content of notebook page is not displayed.

after this commit: when there is only one page in notebook and it has attrs
for invisibilty, when we toggle boolean field to hide/show notebook page
then notebook page as well as content is toggled.

task-2449053

closes odoo/odoo#66338

X-original-commit: a0b5ecd344d6ac79d8e4d194cfabf3d639259c73
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 there is only one page in the notebook tag and
there is a boolean field in form to show/hide that notebook page based on
invisibility attrs, if we toggle boolean field notebook hides, that's OK
but when we toggle boolean field again then notebook page is displayed but
it is not active and due to that content of notebook page is not displayed.

after this commit: when there is only one page in notebook and it has attrs
for invisibilty, when we toggle boolean field to hide/show notebook page
then notebook page as well as content is toggled.

task-2449053

closes odoo/odoo#66338

X-original-commit: a0b5ecd344d6ac79d8e4d194cfabf3d639259c73
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web,mail: Call on_attach_callback when appending content</title>
<updated>2021-02-11T07:44:15+00:00</updated>
<author>
<name>Julien Mougenot</name>
<email>jum@odoo.com</email>
</author>
<published>2020-12-22T16:59:46+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=953fb092636b9919aaa6c6a6cfaffd003ba951d5'/>
<id>953fb092636b9919aaa6c6a6cfaffd003ba951d5</id>
<content type='text'>
Before this commit, the form renderer would call "on_attach_callback"
only when the whole _render process was over. The problem was that this
process is asynchronous and this callback should be invoked as soon as
the widgets are appended.

As such, any asynchronous operation is performed before appending the
content in a new function "__renderView".

Task 2346540

closes odoo/odoo#60791

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, the form renderer would call "on_attach_callback"
only when the whole _render process was over. The problem was that this
process is asynchronous and this callback should be invoked as soon as
the widgets are appended.

As such, any asynchronous operation is performed before appending the
content in a new function "__renderView".

Task 2346540

closes odoo/odoo#60791

Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: race condition with x2many control panel</title>
<updated>2020-11-18T08:39:40+00:00</updated>
<author>
<name>Aaron Bohy</name>
<email>aab@odoo.com</email>
</author>
<published>2020-11-10T14:52:14+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=e8e64f75606f1501a8be7b0bb418a296cfd8be61'/>
<id>e8e64f75606f1501a8be7b0bb418a296cfd8be61</id>
<content type='text'>
The ControlPanel has been converted in Owl [1], and the code using
it has been adapted accordingly. However, in the FieldX2Many, we
didn't properly wait for the ControlPanel to be updated (an update
of the ControlPanel was synchronous before owl, and is now async,
like every Owl renderings, as it waits for the nextAnimationFrame).

As a consequence, we might have tricky issues because the mounted
hook of the control panel might be called multiple times for a
single call to willUnmount later on. In mobile, we bind a global
event handler (on scroll) in mounted, and unbind it in willUnmount,
so we had leftover event handlers, that crashed when called after
the ControlPanel was destroyed. Note that even if the issue popped
in mobile, calling mounted on already mounted Components isn't a
good idea, and this should be fixed anyway.

The issue could be reproduced for instance in FieldService (with
collaborative pads activated in Project), in mobile, by opening
a task in Edit mode. Then, you might get a traceback by scrolling
after having discarded the edition

Here is a description of what technically happened:
 - when clicking on Edit, all widgets (including the FieldX2Many
   are destroyed and re-instantiated in 'edit' mode).
 - the pad widget directly triggers a field_changed event which
   causes a reset of the FieldX2Many (i.e. 'render' is called
   again)
 - the FieldX2Many detects that it already has a renderer (and a
   ControlPanel) so it updates them
 - it first updates the renderer, and when it's done, it updates
   the ControlPanel BUT doesn't wait for its promise, so the
   promise returned by that call to 'render' in FieldX2Many is
   resolved before the ControlPanel is actually updated
 - note that at this point, all thoses new widgets are not in the
   DOM yet
 - when all widgets are ready, the renderer patches the view (i.e.
   the former content is removed from the DOM, and the new one is
   attached into the DOM). As soon as this is done, the renderer
   calls 'on_attach_callback' on its children, including the
   FieldX2Many, which leads to a call to 'mounted' on the CP.
 - then, just before the nextAnimationFrame, Owl complete the
   rendering of the CP, and detects that it is now in the DOM (it
   wasn't at the beginning), so 'mounted' is called a second time,
   will cause the issue described above.

This commit fixes the issue by properly waiting for the CP to be
rendered in the FieldX2Many. However, this required on cascade
changes:
 - Form view renderings with a FieldX2Many are now *really* async
   (+- 16ms), meaning that the user can easily trigger concurrent
   renderings by, e.g. clicking quickly several times on 'Edit',
   'Save' or 'Discard'. Concurrent renderings are properly handled
   so to prevent this from happening, we disable the buttons and
   re-enable them when the rendering is done (like already done in
   [2])
 - in the FieldX2Many, '_updateControlPanel' was called at several
   placed, but we never waited for it. As this method was
   originally sync, its calls have probably been naively adapted,
   whereas their should have been deeply rethought (for instance,
   as it is async, and we need to wait for it, we don't want it
   to be called multiple times sequentially when something happens).
   This commit does that work, i.e. we clean the places where this
   function is called such that it is (hopefully) never called
   sequentially twice. To do so, we changed a bit the spec of the
   pager in multi page, and we also fixed a paging-related  bug.
   In a few words, here is what we did/do when adding a new row
   in the bottom of a full page:
     - before: tweak the count in the data to fool the pager and
       make it think that no new record has been added (so
       basically, let it display something wrong)
     - now: temporarily increase the pager limit so that the new
       record is displayed on the current pager, and the pager
       values are correct w.r.t. the displayed records.
    Some tests needed to be adapted accordingly.
 - By waiting for the ControlPanel when updating the FieldX2Many,
   a bunch of QUnit tests failed. Those tests have something in
   common: they spawn an X2Many (list or kanban theoretically,
   but always list in practice) containing a FieldBoolean (only
   field widget of /web converted in owl). When the FieldX2Many
   is updated, we update the renderer (i.e. re-renderer the
   FieldBoolean, so we have to wait for the nextAnimationFrame),
   and when this is done, we update the page (again, we have
   to wait for the nextAnimationFrame). So basically, we have
   to wait for two nextAnimationFrames to see the result in the
   DOM. For this, we added a new test util which basically does
   a nextTick ('owlCompatibilityNextTick'), and called it
   everywhere it was necessary. When everything will be written
   in Owl, we could get rid of this util and its calls.

[1] https://github.com/odoo/odoo/commit/fbf347498f1cc7b74ef373179b7bcae201715c24
[2] https://github.com/odoo/odoo/commit/39f08950d6e20460e3a20a5b9c33e4ddf66dce78

closes odoo/odoo#61593

Signed-off-by: Adrien Dieudonné (adr) &lt;adr@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The ControlPanel has been converted in Owl [1], and the code using
it has been adapted accordingly. However, in the FieldX2Many, we
didn't properly wait for the ControlPanel to be updated (an update
of the ControlPanel was synchronous before owl, and is now async,
like every Owl renderings, as it waits for the nextAnimationFrame).

As a consequence, we might have tricky issues because the mounted
hook of the control panel might be called multiple times for a
single call to willUnmount later on. In mobile, we bind a global
event handler (on scroll) in mounted, and unbind it in willUnmount,
so we had leftover event handlers, that crashed when called after
the ControlPanel was destroyed. Note that even if the issue popped
in mobile, calling mounted on already mounted Components isn't a
good idea, and this should be fixed anyway.

The issue could be reproduced for instance in FieldService (with
collaborative pads activated in Project), in mobile, by opening
a task in Edit mode. Then, you might get a traceback by scrolling
after having discarded the edition

Here is a description of what technically happened:
 - when clicking on Edit, all widgets (including the FieldX2Many
   are destroyed and re-instantiated in 'edit' mode).
 - the pad widget directly triggers a field_changed event which
   causes a reset of the FieldX2Many (i.e. 'render' is called
   again)
 - the FieldX2Many detects that it already has a renderer (and a
   ControlPanel) so it updates them
 - it first updates the renderer, and when it's done, it updates
   the ControlPanel BUT doesn't wait for its promise, so the
   promise returned by that call to 'render' in FieldX2Many is
   resolved before the ControlPanel is actually updated
 - note that at this point, all thoses new widgets are not in the
   DOM yet
 - when all widgets are ready, the renderer patches the view (i.e.
   the former content is removed from the DOM, and the new one is
   attached into the DOM). As soon as this is done, the renderer
   calls 'on_attach_callback' on its children, including the
   FieldX2Many, which leads to a call to 'mounted' on the CP.
 - then, just before the nextAnimationFrame, Owl complete the
   rendering of the CP, and detects that it is now in the DOM (it
   wasn't at the beginning), so 'mounted' is called a second time,
   will cause the issue described above.

This commit fixes the issue by properly waiting for the CP to be
rendered in the FieldX2Many. However, this required on cascade
changes:
 - Form view renderings with a FieldX2Many are now *really* async
   (+- 16ms), meaning that the user can easily trigger concurrent
   renderings by, e.g. clicking quickly several times on 'Edit',
   'Save' or 'Discard'. Concurrent renderings are properly handled
   so to prevent this from happening, we disable the buttons and
   re-enable them when the rendering is done (like already done in
   [2])
 - in the FieldX2Many, '_updateControlPanel' was called at several
   placed, but we never waited for it. As this method was
   originally sync, its calls have probably been naively adapted,
   whereas their should have been deeply rethought (for instance,
   as it is async, and we need to wait for it, we don't want it
   to be called multiple times sequentially when something happens).
   This commit does that work, i.e. we clean the places where this
   function is called such that it is (hopefully) never called
   sequentially twice. To do so, we changed a bit the spec of the
   pager in multi page, and we also fixed a paging-related  bug.
   In a few words, here is what we did/do when adding a new row
   in the bottom of a full page:
     - before: tweak the count in the data to fool the pager and
       make it think that no new record has been added (so
       basically, let it display something wrong)
     - now: temporarily increase the pager limit so that the new
       record is displayed on the current pager, and the pager
       values are correct w.r.t. the displayed records.
    Some tests needed to be adapted accordingly.
 - By waiting for the ControlPanel when updating the FieldX2Many,
   a bunch of QUnit tests failed. Those tests have something in
   common: they spawn an X2Many (list or kanban theoretically,
   but always list in practice) containing a FieldBoolean (only
   field widget of /web converted in owl). When the FieldX2Many
   is updated, we update the renderer (i.e. re-renderer the
   FieldBoolean, so we have to wait for the nextAnimationFrame),
   and when this is done, we update the page (again, we have
   to wait for the nextAnimationFrame). So basically, we have
   to wait for two nextAnimationFrames to see the result in the
   DOM. For this, we added a new test util which basically does
   a nextTick ('owlCompatibilityNextTick'), and called it
   everywhere it was necessary. When everything will be written
   in Owl, we could get rid of this util and its calls.

[1] https://github.com/odoo/odoo/commit/fbf347498f1cc7b74ef373179b7bcae201715c24
[2] https://github.com/odoo/odoo/commit/39f08950d6e20460e3a20a5b9c33e4ddf66dce78

closes odoo/odoo#61593

Signed-off-by: Adrien Dieudonné (adr) &lt;adr@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] sale_timesheet, web: disable autofocus on create invoce action</title>
<updated>2020-09-28T11:16:15+00:00</updated>
<author>
<name>Kamesh Patel</name>
<email>kat@odoo.com</email>
</author>
<published>2020-09-25T06:21:34+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=cf8545e10062ba89ac0de5441cfcbdb65d921eaa'/>
<id>cf8545e10062ba89ac0de5441cfcbdb65d921eaa</id>
<content type='text'>
Before this commit:

The date range widget opened by default when the 'create invoices'
the wizard is opened. because the default focus is 'Timesheets Period'
field.

After this commit:

Disable autofocus on 'create invoice' action, after this changes The
date range widget is not opened by default when the 'create invoices'
the wizard is opened.

Task-2344289

closes odoo/odoo#58676

Signed-off-by: Yannick Tivisse (yti) &lt;yti@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before this commit:

The date range widget opened by default when the 'create invoices'
the wizard is opened. because the default focus is 'Timesheets Period'
field.

After this commit:

Disable autofocus on 'create invoice' action, after this changes The
date range widget is not opened by default when the 'create invoices'
the wizard is opened.

Task-2344289

closes odoo/odoo#58676

Signed-off-by: Yannick Tivisse (yti) &lt;yti@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: list: call mounted on subcomponents at reload</title>
<updated>2020-09-15T15:01:51+00:00</updated>
<author>
<name>Aaron Bohy</name>
<email>aab@odoo.com</email>
</author>
<published>2020-09-15T12:35:48+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=8edfe6b32f779d8f0428e7be7a335fdfa7e44a89'/>
<id>8edfe6b32f779d8f0428e7be7a335fdfa7e44a89</id>
<content type='text'>
Issue was spotted in list views containing the "badge" widget with
decorations (e.g. in the Purchase Order list view). At first, the
decorations were correctly applied, but they weren't anymore after
a reload (e.g. after toggling a filter).

They weren't because the list renderer didn't called
'on_attach_callback' on its subwidgets at reload (thus, 'mounted'
wasn't called on its subcomponents, and the decorations are applied
in the mounted hook).

This commit moves the logic from the FormRenderer to the
BasicRenderer, so that it applies on List, Kanban, and Form views.

This commit also removes the transition scss rule on the badge
field widget as it caused a flickering at reload.

Task 2336440

closes odoo/odoo#57762

X-original-commit: 713bce22e8f412f2c26e663b9e30fdd64933ff0c
Signed-off-by: Michaël Mattiello &lt;mcm-odoo@users.noreply.github.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>
Issue was spotted in list views containing the "badge" widget with
decorations (e.g. in the Purchase Order list view). At first, the
decorations were correctly applied, but they weren't anymore after
a reload (e.g. after toggling a filter).

They weren't because the list renderer didn't called
'on_attach_callback' on its subwidgets at reload (thus, 'mounted'
wasn't called on its subcomponents, and the decorations are applied
in the mounted hook).

This commit moves the logic from the FormRenderer to the
BasicRenderer, so that it applies on List, Kanban, and Form views.

This commit also removes the transition scss rule on the badge
field widget as it caused a flickering at reload.

Task 2336440

closes odoo/odoo#57762

X-original-commit: 713bce22e8f412f2c26e663b9e30fdd64933ff0c
Signed-off-by: Michaël Mattiello &lt;mcm-odoo@users.noreply.github.com&gt;
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: form: Archive action when field not in view</title>
<updated>2020-09-03T13:56:13+00:00</updated>
<author>
<name>Aaron Bohy</name>
<email>aab@odoo.com</email>
</author>
<published>2020-09-03T11:52:56+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=5bb8b927524d062be32f92eb326ef64091301de1'/>
<id>5bb8b927524d062be32f92eb326ef64091301de1</id>
<content type='text'>
Before this commit, when being in a form view without active field
(the field is defined on the model, but not present in the view),
the action "Unarchive" was available in the Actions menu, even
though the record was actually active.

The issue has been introduced by [1]. This commit restores the
previous behavior: when the active field isn't in the view, the
Archive/Unarchive action isn't available in the Actions menu.

[1] 220eb4db391d8ba49dd26bdd3d8af1c27b433d78

closes odoo/odoo#57038

X-original-commit: 97b70aab69b491443d862847fbff69c4e29274af
Signed-off-by: Julien Mougenot (jum) &lt;jum@odoo.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>
Before this commit, when being in a form view without active field
(the field is defined on the model, but not present in the view),
the action "Unarchive" was available in the Actions menu, even
though the record was actually active.

The issue has been introduced by [1]. This commit restores the
previous behavior: when the active field isn't in the view, the
Archive/Unarchive action isn't available in the Actions menu.

[1] 220eb4db391d8ba49dd26bdd3d8af1c27b433d78

closes odoo/odoo#57038

X-original-commit: 97b70aab69b491443d862847fbff69c4e29274af
Signed-off-by: Julien Mougenot (jum) &lt;jum@odoo.com&gt;
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] web: set focus to first visible page when active page invisible</title>
<updated>2020-08-20T12:37:36+00:00</updated>
<author>
<name>Mohammed Shekha</name>
<email>msh@odoo.com</email>
</author>
<published>2020-04-07T12:32:43+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=ce69db55f80777b95015c23dc4b3fa1a6db5daad'/>
<id>ce69db55f80777b95015c23dc4b3fa1a6db5daad</id>
<content type='text'>
Before this commit: if there are modifiers based on field which hides
one page and show another and if active page get invisible then instead
of first page second page gets focus, consider following example,

`&lt;form&gt;
    &lt;field name="boolean"/&gt;
    &lt;page name="page1" attrs='{"invisible": [["bar", "=", false]]}'&gt;&lt;/page&gt;
    &lt;page name="page2" attrs='{"invisible": [["bar", "=", true]]}'&gt;&lt;/page&gt;
    &lt;page name="page3"&gt;&lt;/page&gt;
&lt;/form&gt;`

Consider the initial boolean value to be true; initially the first page
will be visible. But when "bar" is unchecked then page1 will be hidden
and page3 will get the focus as page2 is still not visible: it will be
after the computaion/application of all modifiers, which is currently
done after the rendering of a tab page.

Now: the first visible tab is focused on rendering (same as before) but
also after all modifiers have been updated.

closes odoo/odoo#56209

X-original-commit: 10365572aa3629e9b19d2b29726b351275de9f52
Signed-off-by: Lucas Perais (lpe) &lt;lpe@odoo.com&gt;
Co-authored-by: Ipsita Borisagar &lt;ibo@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>
Before this commit: if there are modifiers based on field which hides
one page and show another and if active page get invisible then instead
of first page second page gets focus, consider following example,

`&lt;form&gt;
    &lt;field name="boolean"/&gt;
    &lt;page name="page1" attrs='{"invisible": [["bar", "=", false]]}'&gt;&lt;/page&gt;
    &lt;page name="page2" attrs='{"invisible": [["bar", "=", true]]}'&gt;&lt;/page&gt;
    &lt;page name="page3"&gt;&lt;/page&gt;
&lt;/form&gt;`

Consider the initial boolean value to be true; initially the first page
will be visible. But when "bar" is unchecked then page1 will be hidden
and page3 will get the focus as page2 is still not visible: it will be
after the computaion/application of all modifiers, which is currently
done after the rendering of a tab page.

Now: the first visible tab is focused on rendering (same as before) but
also after all modifiers have been updated.

closes odoo/odoo#56209

X-original-commit: 10365572aa3629e9b19d2b29726b351275de9f52
Signed-off-by: Lucas Perais (lpe) &lt;lpe@odoo.com&gt;
Co-authored-by: Ipsita Borisagar &lt;ibo@odoo.com&gt;
Co-authored-by: Julien Mougenot &lt;jum@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: form: prevent from calling mounted twice</title>
<updated>2020-08-05T11:54:42+00:00</updated>
<author>
<name>Michael Mattiello (mcm)</name>
<email>mcm@odoo.com</email>
</author>
<published>2020-08-03T13:24:14+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=faab9ee9f6dd9ef8afba51151de32fdb69db1fd6'/>
<id>faab9ee9f6dd9ef8afba51151de32fdb69db1fd6</id>
<content type='text'>
With this commit, the FormRenderer no longer directly extends
the WidgetAdapterMixin. It doesn't need to as its parent class
(the BasicRenderer) already uses it. Worse, they both called
WidgetAdapterMixin.on_attach_callback, and thus mounted
was called twice on Components in form views.

closes odoo/odoo#55401

X-original-commit: 4c627abd310a131a4828e9ee6be451aeee4708db
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, the FormRenderer no longer directly extends
the WidgetAdapterMixin. It doesn't need to as its parent class
(the BasicRenderer) already uses it. Worse, they both called
WidgetAdapterMixin.on_attach_callback, and thus mounted
was called twice on Components in form views.

closes odoo/odoo#55401

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