diff options
| author | Christophe Simonis <chs@openerp.com> | 2014-04-07 18:17:28 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@openerp.com> | 2014-04-07 18:17:28 +0200 |
| commit | f1d3f2a0c42f1de5970b5f897c4e5b279d1ee23b (patch) | |
| tree | 9d5f632e397b7cfcc3bb472cbda371b481558baf /addons/web/static/src/js/data.js | |
| parent | 0161666e8b6e91da575a96be005cb5f84c64e9cb (diff) | |
| parent | ffae3807255269ff290bdf9fe62bc668feaade75 (diff) | |
[MERGE] forward port of branch saas-3 up to revid 3995 chs@openerp.com-20140407144625-jfimvsx4mgrkztqv
bzr revid: chs@openerp.com-20140407161728-ccudwnqo970ac8ay
Diffstat (limited to 'addons/web/static/src/js/data.js')
| -rw-r--r-- | addons/web/static/src/js/data.js | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/addons/web/static/src/js/data.js b/addons/web/static/src/js/data.js index 517afa7f5c2..73f244bc6a3 100644 --- a/addons/web/static/src/js/data.js +++ b/addons/web/static/src/js/data.js @@ -457,9 +457,17 @@ instance.web.DataSet = instance.web.Class.extend(instance.web.PropertiesMixin, return $.Deferred().resolve([]); options = options || {}; - return this._model.call('read', - [ids, fields || false], - {context: this.get_context(options.context)}) + var method = 'read'; + var ids_arg = ids; + var context = this.get_context(options.context); + if (options.check_access_rule === true){ + method = 'search_read'; + ids_arg = [['id', 'in', ids]]; + context = new instance.web.CompoundContext(context, {active_test: false}); + } + return this._model.call(method, + [ids_arg, fields || false], + {context: context}) .then(function (records) { if (records.length <= 1) { return records; } var indexes = {}; |
