[IMP] data: skip read_ids call when got no id (opw 604099).
This avoids making useless calls to to read the values of o2m fields when the read on a record already told us there was no ids. bzr revid: mat@openerp.com-20140218101438-yqim33cvtg6wt4mw
This commit is contained in:
parent
e1dff48492
commit
2e831ab7c3
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue