[FIX] Refactoring leftovers
authorFabien Meghazi <fme@openerp.com>
Wed, 11 Jan 2012 08:49:52 +0000 (09:49 +0100)
committerFabien Meghazi <fme@openerp.com>
Wed, 11 Jan 2012 08:49:52 +0000 (09:49 +0100)
bzr revid: fme@openerp.com-20120111084952-n7ghlby6uos5i0nb

addons/web/static/src/js/data.js

index b75f241..663e596 100644 (file)
@@ -629,8 +629,8 @@ openerp.web.BufferedDataSet = openerp.web.DataSetStatic.extend({
         this.reset_ids([]);
         this.last_default_get = {};
     },
-    default_get: function(fields, callback) {
-        return this._super(fields).then(this.on_default_get).then(callback);
+    default_get: function(fields, options) {
+        return this._super(fields, options).then(this.on_default_get);
     },
     on_default_get: function(res) {
         this.last_default_get = res;
@@ -698,7 +698,7 @@ openerp.web.BufferedDataSet = openerp.web.DataSetStatic.extend({
         this.delete_all = false;
     },
     on_change: function() {},
-    read_ids: function (ids, fields) {
+    read_ids: function (ids, fields, options) {
         var self = this;
         var to_get = [];
         _.each(ids, function(id) {
@@ -725,7 +725,7 @@ openerp.web.BufferedDataSet = openerp.web.DataSetStatic.extend({
             completion.resolve(records);
         };
         if(to_get.length > 0) {
-            var rpc_promise = this._super(to_get, fields, function(records) {
+            var rpc_promise = this._super(to_get, fields, options).then(function(records) {
                 _.each(records, function(record, index) {
                     var id = to_get[index];
                     var cached = _.detect(self.cache, function(x) {return x.id === id;});
@@ -774,8 +774,8 @@ openerp.web.ProxyDataSet = openerp.web.DataSetSearch.extend({
             return this._super.apply(this, arguments);
         }
     },
-    default_get: function(fields, callback) {
-        return this._super(fields, callback).then(this.on_default_get);
+    default_get: function(fields, options) {
+        return this._super(fields, options).then(this.on_default_get);
     },
     on_default_get: function(result) {},
     create: function(data, callback, error_callback) {