[imp] removed asynchronous operations in buffered dataset, "l'amour du risque, papapalapapapa"

bzr revid: nicolas.vanhoren@openerp.com-20111010141804-zc6t2sr60twz6r4s
This commit is contained in:
niv-openerp 2011-10-10 16:18:04 +02:00
parent d31295d65b
commit 9857cb60fa
1 changed files with 2 additions and 2 deletions

View File

@ -617,7 +617,7 @@ openerp.web.BufferedDataSet = openerp.web.DataSetStatic.extend({
this.cache.push(cached);
this.on_change();
var prom = $.Deferred().then(callback);
setTimeout(function() {prom.resolve({result: cached.id});}, 0);
prom.resolve({result: cached.id});
return prom.promise();
},
write: function (id, data, options, callback) {
@ -695,7 +695,7 @@ openerp.web.BufferedDataSet = openerp.web.DataSetStatic.extend({
throw "Record not correctly loaded";
}
}
setTimeout(function () {completion.resolve(records);}, 0);
completion.resolve(records);
};
if(to_get.length > 0) {
var rpc_promise = this._super(to_get, fields, function(records) {