summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/data.js
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2012-10-17 13:07:50 +0200
committerXavier Morel <xmo@openerp.com>2012-10-17 13:07:50 +0200
commit5d5a8e85c223060262ce55073cf7d38db02870d4 (patch)
tree75e835bea69422b8d1c031c3ac1e0a611ddf26f6 /addons/web/static/src/js/data.js
parent90fadfa553edc045d16fc95bf26ceda531916fe2 (diff)
[FIX] group_by_no_leaf handling
bzr revid: xmo@openerp.com-20121017110750-vrtx04b40e4kralm
Diffstat (limited to 'addons/web/static/src/js/data.js')
-rw-r--r--addons/web/static/src/js/data.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/addons/web/static/src/js/data.js b/addons/web/static/src/js/data.js
index 77583899bf1..30a8b9862fc 100644
--- a/addons/web/static/src/js/data.js
+++ b/addons/web/static/src/js/data.js
@@ -120,6 +120,10 @@ instance.web.Query = instance.web.Class.extend({
if (_.isEmpty(grouping)) { return null; }
var self = this;
+
+ // FIXME: when pyeval is merged
+ var ctx = instance.session.test_eval_contexts(
+ [this._model.context(this._context)]);
return this._model.call('read_group', {
groupby: grouping,
fields: _.uniq(grouping.concat(this._fields || [])),
@@ -130,6 +134,8 @@ instance.web.Query = instance.web.Class.extend({
orderby: instance.web.serialize_sort(this._order_by) || false
}).pipe(function (results) {
return _(results).map(function (result) {
+ // FIX: querygroup initialization
+ _.defaults(result.__context, ctx);
return new instance.web.QueryGroup(
self._model.name, grouping[0], result);
});