Skip to content
Snippets Groups Projects
Commit d3854dbf authored by Romeo Fragomeli's avatar Romeo Fragomeli
Browse files

[FIX] web: client report action mounted called twice


Before this commit, the 'mounted' method of the ControlPanel in
the client report action  was called twice.

It happened because the client report action updated the ControlPanel
before being actually mounted, so mounted was called once when the
traceability report was mounted, and once when the update was applied.

Ideally, this should not be an issue (this isn't an issue with owl).
However, in Odoo, we mix layers of Owl Components and legacy
widgets. In these situations, the above scenario isn't properly
handled (and can't be).

As a consequence, in mobile (enterprise), it crashed because an
handler bound in mounted (thus twice) was only unbound once.

This commit avoids the issue as the update was actually useless.

Steps to reproduces (Mobile):
* Go to Inventory (Stock)
* Open the "burger menu"
* Select "Products" -> "Products"
* Select one product in the list
* Click on the "Forecasted" ("stat button")
* Select one "SO line" (sale order) to go to the form view
* Go back to the previous view using breadcrumb
* Optional: Go to another app if the screen can't scroll (e.g. go to Sales)
* Scroll the view => Bug

closes odoo/odoo#65522

Related: odoo/enterprise#16033
Signed-off-by: default avatarAdrien Dieudonné (adr) <adr@odoo.com>
parent bbcd8ce0
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment