summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorVincent Schippefilt <vsc@odoo.com>2019-03-06 14:02:30 +0100
committerAaron Bohy <aab@odoo.com>2019-03-06 20:07:17 +0100
commit3f4a056e7c42faa96bbd15de6f13f8dcf03e37b4 (patch)
tree101632816c7228c02ca6f39e8d5a765aaef47cc6 /addons
parentde9006f112f0741e3575dab6573bda04688f4bae (diff)
[REF] stock: 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')
-rw-r--r--addons/stock/static/src/js/stock_traceability_report_backend.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/stock/static/src/js/stock_traceability_report_backend.js b/addons/stock/static/src/js/stock_traceability_report_backend.js
index aee712a38b3..56673f4e094 100644
--- a/addons/stock/static/src/js/stock_traceability_report_backend.js
+++ b/addons/stock/static/src/js/stock_traceability_report_backend.js
@@ -29,11 +29,11 @@ var stock_report_generic = AbstractAction.extend({
this.given_context.lot_name = action.context.lot_name || false;
},
willStart: function() {
- return $.when(this._super.apply(this, arguments), this.get_html());
+ return Promise.all([this._super.apply(this, arguments), this.get_html()]);
},
set_html: function() {
var self = this;
- var def = $.when();
+ var def = Promise.resolve();
if (!this.report_widget) {
this.report_widget = new ReportWidget(this, this.given_context);
def = this.report_widget.appendTo(this.$('.o_content'));
@@ -67,7 +67,7 @@ var stock_report_generic = AbstractAction.extend({
self.html = result.html;
self.renderButtons();
defs.push(self.update_cp());
- return $.when.apply($, defs);
+ return Promise.all(defs);
});
},
// Updates the control panel and render the elements that have yet to be rendered