[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:
parent
d31295d65b
commit
9857cb60fa
|
@ -617,7 +617,7 @@ openerp.web.BufferedDataSet = openerp.web.DataSetStatic.extend({
|
||||||
this.cache.push(cached);
|
this.cache.push(cached);
|
||||||
this.on_change();
|
this.on_change();
|
||||||
var prom = $.Deferred().then(callback);
|
var prom = $.Deferred().then(callback);
|
||||||
setTimeout(function() {prom.resolve({result: cached.id});}, 0);
|
prom.resolve({result: cached.id});
|
||||||
return prom.promise();
|
return prom.promise();
|
||||||
},
|
},
|
||||||
write: function (id, data, options, callback) {
|
write: function (id, data, options, callback) {
|
||||||
|
@ -695,7 +695,7 @@ openerp.web.BufferedDataSet = openerp.web.DataSetStatic.extend({
|
||||||
throw "Record not correctly loaded";
|
throw "Record not correctly loaded";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setTimeout(function () {completion.resolve(records);}, 0);
|
completion.resolve(records);
|
||||||
};
|
};
|
||||||
if(to_get.length > 0) {
|
if(to_get.length > 0) {
|
||||||
var rpc_promise = this._super(to_get, fields, function(records) {
|
var rpc_promise = this._super(to_get, fields, function(records) {
|
||||||
|
|
Loading…
Reference in New Issue