diff options
Diffstat (limited to 'addons/web/static/src/js/views/graph')
| -rw-r--r-- | addons/web/static/src/js/views/graph/graph_model.js | 10 | ||||
| -rw-r--r-- | addons/web/static/src/js/views/graph/graph_renderer.js | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/addons/web/static/src/js/views/graph/graph_model.js b/addons/web/static/src/js/views/graph/graph_model.js index 4c359a4778f..91b017524d8 100644 --- a/addons/web/static/src/js/views/graph/graph_model.js +++ b/addons/web/static/src/js/views/graph/graph_model.js @@ -50,7 +50,7 @@ return AbstractModel.extend({ * @param {string[]} params.domain * @param {Object} params.intervalMapping object linking fieldNames with intervals. * this could be useful to simplify the code. For now this parameter is not used. - * @returns {Deferred} The deferred does not return a handle, we don't need + * @returns {Promise} The promise does not return a handle, we don't need * to keep track of various entities. */ load: function (params) { @@ -92,7 +92,7 @@ return AbstractModel.extend({ * @param {string[]} [params.groupBy] * @param {string} [params.mode] one of 'bar', 'pie', 'line' * @param {string} [params.measure] a valid field name - * @returns {Deferred} + * @returns {Promise} */ reload: function (handle, params) { if ('context' in params) { @@ -130,7 +130,7 @@ return AbstractModel.extend({ } if ('mode' in params) { this.chart.mode = params.mode; - return $.when(); + return Promise.resolve(); } return this._loadGraph(); }, @@ -145,7 +145,7 @@ return AbstractModel.extend({ * in the field list, because they can be defined with an aggregation * function, such as my_date:week * - * @returns {Deferred} + * @returns {Promise} */ _loadGraph: function () { var groupedBy = this.chart.groupedBy; @@ -186,7 +186,7 @@ return AbstractModel.extend({ }).then(this._processData.bind(this, 'comparisonData'))); } - return $.when.apply($, defs); + return Promise.all(defs); }, /** * Since read_group is insane and returns its result on different keys diff --git a/addons/web/static/src/js/views/graph/graph_renderer.js b/addons/web/static/src/js/views/graph/graph_renderer.js index 9353301ca09..6311df5d8b2 100644 --- a/addons/web/static/src/js/views/graph/graph_renderer.js +++ b/addons/web/static/src/js/views/graph/graph_renderer.js @@ -99,7 +99,7 @@ return AbstractRenderer.extend({ * * @override * @private - * @returns {Deferred} The _super deferred is actually resolved immediately + * @returns {Promise} The _super promise is actually resolved immediately */ _render: function () { if (this.to_remove) { |
