[IMP] don;t needlessly wrap values into deferreds in pipes

bzr revid: xmo@openerp.com-20120613153412-c2byqrc66jcn0e97
This commit is contained in:
Xavier Morel 2012-06-13 17:34:12 +02:00
parent 5ec4ecf85d
commit e475bc7a2a
1 changed files with 5 additions and 3 deletions

View File

@ -549,7 +549,8 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView#
return $.Deferred().reject();
} else {
return $.when(this.reload()).pipe(function () {
return $.when(r).then(success); }, null);
return r; })
.then(success);
}
},
/**
@ -583,8 +584,9 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView#
this.sidebar.attachments.do_update();
}
//openerp.log("The record has been created with id #" + this.datarecord.id);
this.reload();
return $.when(_.extend(r, {created: true})).then(success);
return $.when(this.reload()).pipe(function () {
return _.extend(r, {created: true}); })
.then(success);
}
},
on_action: function (action) {