summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/abstract_renderer.js
diff options
context:
space:
mode:
authorVincent Schippefilt <vsc@odoo.com>2019-03-06 14:02:32 +0100
committerAaron Bohy <aab@odoo.com>2019-03-06 20:07:17 +0100
commitab56e637b7f97ddcdbcc9baea99ae097e342409c (patch)
tree4cb47da9f7ef89b19d18429220a7507470ec12a9 /addons/web/static/src/js/views/abstract_renderer.js
parenteeed894fd50e477135e1ac9a82f6e98ce063ab90 (diff)
[REF] web: adapt code after jQuery update
Part of task 1896658 Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Christophe Matthieu <chm@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: David Monjoie <dmo@odoo.com> Co-authored-by: Martin Geubelle <mge@odoo.com> Co-authored-by: svs-odoo <svs@odoo.com> Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views/abstract_renderer.js')
-rw-r--r--addons/web/static/src/js/views/abstract_renderer.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/addons/web/static/src/js/views/abstract_renderer.js b/addons/web/static/src/js/views/abstract_renderer.js
index 0f18263c9ee..724b63bae79 100644
--- a/addons/web/static/src/js/views/abstract_renderer.js
+++ b/addons/web/static/src/js/views/abstract_renderer.js
@@ -23,14 +23,14 @@ return mvc.Renderer.extend({
this.noContentHelp = params.noContentHelp;
},
/**
- * The rendering can be asynchronous (but it is not encouraged). The start
+ * The rendering is asynchronous. The start
* method simply makes sure that we render the view.
*
- * @returns {Deferred}
+ * @returns {Promise}
*/
start: function () {
this.$el.addClass(this.arch.attrs.class);
- return $.when(this._render(), this._super());
+ return Promise.all([this._render(), this._super()]);
},
/**
* Called each time the renderer is attached into the DOM.
@@ -86,11 +86,11 @@ return mvc.Renderer.extend({
* @param {Object} params
* @param {boolean} [params.noRender=false]
* if true, the method only updates the state without rerendering
- * @returns {Deferred}
+ * @returns {Promise}
*/
updateState: function (state, params) {
this.state = state;
- return params.noRender ? $.when() : this._render();
+ return params.noRender ? Promise.resolve() : this._render();
},
//--------------------------------------------------------------------------
@@ -102,10 +102,10 @@ return mvc.Renderer.extend({
*
* @abstract
* @private
- * @returns {Deferred}
+ * @returns {Promise}
*/
_render: function () {
- return $.when();
+ return Promise.resolve();
},
});