diff options
| author | Romeo Fragomeli <rfr@odoo.com> | 2021-02-04 16:42:48 +0000 |
|---|---|---|
| committer | Romeo Fragomeli <rfr@odoo.com> | 2021-02-18 10:09:22 +0000 |
| commit | d3854dbf7a6e0c0f9ac00c11716908bc175808d7 (patch) | |
| tree | 395b7fdaa03710f585c86ecbe621ccf5edd2b14a /addons/web/static/src/js | |
| parent | bbcd8ce097e62bd1d9ba3a61608324a80a111c24 (diff) | |
[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: Adrien Dieudonné (adr) <adr@odoo.com>
Diffstat (limited to 'addons/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/report/client_action.js | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/addons/web/static/src/js/report/client_action.js b/addons/web/static/src/js/report/client_action.js index 9b7d1fb6124..d4cb3096aea 100644 --- a/addons/web/static/src/js/report/client_action.js +++ b/addons/web/static/src/js/report/client_action.js @@ -53,15 +53,6 @@ var ReportAction = AbstractAction.extend({ }); }, - do_show: function () { - this.updateControlPanel({ - cp_content: { - $buttons: this.$buttons, - }, - }); - return this._super.apply(this, arguments); - }, - on_attach_callback: function () { // Register now the postMessage event handler. We only want to listen to ~trusted // messages and we can only filter them by their origin, so we chose to ignore the |
