diff --git a/addons/account/static/src/js/reconciliation/reconciliation_model.js b/addons/account/static/src/js/reconciliation/reconciliation_model.js index fcfc5f35ab7d1473708748f93e6bd061068c77a5..cff4d7b91bec63ce32bffd1a277ed01605f5ca6a 100644 --- a/addons/account/static/src/js/reconciliation/reconciliation_model.js +++ b/addons/account/static/src/js/reconciliation/reconciliation_model.js @@ -510,13 +510,15 @@ var StatementModel = BasicModel.extend({ line.mode = (id || line.mode !== "create") && isNaN(id) && !this.avoidCreate ? 'create' : 'match'; defs.push(this._computeLine(line)); if (line.mode === 'create') { - return $.when(defs).then(function () { + return $.when.apply($, defs).then(function () { return self.createProposition(handle); }); } else if (line.mode === 'match') { - return $.when(defs, self._performMoveLine(handle)); + return $.when.apply($, defs).then(function () { + return self._performMoveLine(handle); + }); } - return $.when(defs); + return $.when.apply($, defs); }, searchBalanceAmount: function (handle) { var line = this.getLine(handle);