diff options
| author | Yogesh (OpenERP) <ysa@tinyerp.com> | 2011-11-17 10:27:31 +0530 |
|---|---|---|
| committer | Yogesh (OpenERP) <ysa@tinyerp.com> | 2011-11-17 10:27:31 +0530 |
| commit | ae931e7a9d29e65271fbc3151f7db35cfd4655d3 (patch) | |
| tree | 597806878d54a302d180db9060f524813dc60a16 /addons/web/static/src/js/data.js | |
| parent | bc3a1f52940ec65db7b72141490711aacb6703a5 (diff) | |
| parent | 811c58e69737d61b42b953cffb95f857b22700de (diff) | |
[MERGE] Merge with trunk upto revision no 1493.
bzr revid: ysa@tinyerp.com-20111117045731-9zjfsdrt7j590yx1
Diffstat (limited to 'addons/web/static/src/js/data.js')
| -rw-r--r-- | addons/web/static/src/js/data.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/addons/web/static/src/js/data.js b/addons/web/static/src/js/data.js index f4509c82a81..e783f374dce 100644 --- a/addons/web/static/src/js/data.js +++ b/addons/web/static/src/js/data.js @@ -119,17 +119,18 @@ openerp.web.ContainerDataGroup = openerp.web.DataGroup.extend( /** @lends opener aggregates[key] = value || 0; }); + var group_size = fixed_group[field_name + '_count'] || fixed_group.__count || 0; + var leaf_group = fixed_group.__context.group_by.length === 0; return { __context: fixed_group.__context, __domain: fixed_group.__domain, grouped_on: field_name, // if terminal group (or no group) and group_by_no_leaf => use group.__count - length: fixed_group[field_name + '_count'] || fixed_group.__count, + length: group_size, value: fixed_group[field_name], - - openable: !(this.context['group_by_no_leaf'] - && fixed_group.__context.group_by.length === 0), + // A group is openable if it's not a leaf in group_by_no_leaf mode + openable: !(leaf_group && this.context['group_by_no_leaf']), aggregates: aggregates }; |
