[MERGE] [FIX] one2many fields: when sortign on a column of type m2o (format (id,...
[odoo/odoo.git] / addons / web / static / src / js / data.js
index e7dc81e..ee24c48 100644 (file)
@@ -428,6 +428,9 @@ instance.web.DataSet =  instance.web.Class.extend(instance.web.PropertiesMixin,
      * @returns {$.Deferred}
      */
     read_ids: function (ids, fields, options) {
+        if (_.isEmpty(ids))
+            return $.Deferred().resolve([]);
+            
         options = options || {};
         // TODO: reorder results to match ids list
         return this._model.call('read',