diff options
| author | Michael Mattiello (mcm) <mcm@odoo.com> | 2020-05-26 11:04:40 +0000 |
|---|---|---|
| committer | Michael Mattiello (mcm) <mcm@odoo.com> | 2020-05-27 12:26:04 +0000 |
| commit | cf90b56c3cd8a8a7012cded0cf7690fc63e3190f (patch) | |
| tree | 89cac1ceca97af69f4e7fe2d08179748fec25eca /addons/web/static/src/js/views | |
| parent | bb4b07df3f617122022306d7aead2ed1e3c73419 (diff) | |
[FIX] web: mount owl renderer once
Before this commit, owl renderers were mounted twice.
This commit makes owl renderers mounted just once as it should be
X-original-commit: 9234aa5c5c7de2f7af23071a3ff76adf93e9cee7
Diffstat (limited to 'addons/web/static/src/js/views')
| -rw-r--r-- | addons/web/static/src/js/views/abstract_controller.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/addons/web/static/src/js/views/abstract_controller.js b/addons/web/static/src/js/views/abstract_controller.js index 866abb03d65..f68c4b793a8 100644 --- a/addons/web/static/src/js/views/abstract_controller.js +++ b/addons/web/static/src/js/views/abstract_controller.js @@ -125,7 +125,9 @@ var AbstractController = mvc.Controller.extend(ActionMixin, { this._controlPanelModel.on('search', this, this._onSearch); this._controlPanelModel.on('get-controller-query-params', this, this._onGetOwnedQueryParams); } - this.renderer.on_attach_callback(); + if (!(this.renderer instanceof owl.Component)) { + this.renderer.on_attach_callback(); + } }, /** * Called each time the controller is detached from the DOM. @@ -136,7 +138,9 @@ var AbstractController = mvc.Controller.extend(ActionMixin, { this._controlPanelModel.off('search', this); this._controlPanelModel.off('get-controller-query-params', this); } - this.renderer.on_detach_callback(); + if (!(this.renderer instanceof owl.Component)) { + this.renderer.on_detach_callback(); + } }, //-------------------------------------------------------------------------- |
