[FIX] problem in read_group, caused an exception "cannot read 'lang' in undefined" in a lot of views

bzr revid: nicolas.vanhoren@openerp.com-20121022124935-mxfzx2wg431bqhm9
This commit is contained in:
niv-openerp 2012-10-22 14:49:35 +02:00
parent b631b13742
commit c6eaa8beb8
1 changed files with 2 additions and 0 deletions

View File

@ -135,6 +135,8 @@ instance.web.Query = instance.web.Class.extend({
}).pipe(function (results) {
return _(results).map(function (result) {
// FIX: querygroup initialization
result.__context = result.__context || {};
result.__context.group_by = result.__context.group_by || [];
_.defaults(result.__context, ctx);
return new instance.web.QueryGroup(
self._model.name, grouping[0], result);