diff --git a/src/model.js b/src/model.js index 6b4a4a1b5d..a615809394 100644 --- a/src/model.js +++ b/src/model.js @@ -794,7 +794,7 @@ } } this.set_default(values); - jQuery.when.apply(promises).then(function() { + jQuery.when.apply(jQuery, promises).then(function() { dfd.resolve(values); }); }.bind(this)); @@ -835,7 +835,7 @@ this._loaded[fname] = true; fieldnames.push(fname); } - return jQuery.when.apply(promises).then(function() { + return jQuery.when.apply(jQuery, promises).then(function() { return this.on_change(fieldnames).then(function() { return this.on_change_with(fieldnames).then(function() { var callback = function() { @@ -1024,7 +1024,7 @@ } promises.push(this.do_autocomplete(fname)); } - return jQuery.when.apply(promises); + return jQuery.when.apply(jQuery, promises); }, do_autocomplete: function(fieldname) { this.autocompletion[fieldname] = []; @@ -1838,7 +1838,7 @@ } }); } - return jQuery.when.apply(promises); + return jQuery.when.apply(jQuery, promises); }; return prm.then(set_value); },