[FIX] Fixed data#read_index() so it returns same argument to callback and to .then()

bzr revid: fme@openerp.com-20111117130913-lji983yp8b7vb0do
This commit is contained in:
Fabien Meghazi 2011-11-17 14:09:13 +01:00
parent 41aded04c4
commit 5ebcc65fc5
1 changed files with 1 additions and 1 deletions

View File

@ -316,7 +316,7 @@ openerp.web.DataSet = openerp.web.Widget.extend( /** @lends openerp.web.DataSet
def.reject();
} else {
fields = fields || false;
return this.read_ids([this.ids[this.index]], fields).then(function(records) {
this.read_ids([this.ids[this.index]], fields).then(function(records) {
def.resolve(records[0]);
}, function() {
def.reject.apply(def, arguments);