projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e1dff48
)
[IMP] data: skip read_ids call when got no id (opw 604099).
author
Martin Trigaux
<mat@openerp.com>
Tue, 18 Feb 2014 10:14:38 +0000
(11:14 +0100)
committer
Martin Trigaux
<mat@openerp.com>
Tue, 18 Feb 2014 10:14:38 +0000
(11:14 +0100)
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
addons/web/static/src/js/data.js
patch
|
blob
|
history
diff --git
a/addons/web/static/src/js/data.js
b/addons/web/static/src/js/data.js
index
abfb4c1
..
04b0229
100644
(file)
--- a/
addons/web/static/src/js/data.js
+++ b/
addons/web/static/src/js/data.js
@@
-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',