[FIX] correctly filters out empty groups in read_group results in the data loading code of graph view (addon web_graph)

bzr revid: ged@openerp.com-20140402114758-8qfdz8j76t2p2juo
This commit is contained in:
Gery Debongnie 2014-04-02 13:47:58 +02:00
parent cf87e07aeb
commit c138b778df
1 changed files with 3 additions and 1 deletions

View File

@ -392,7 +392,9 @@ openerp.web_graph.PivotTable = openerp.web.Class.extend({
.lazy(false)
.group_by(groupbys)
.then(function (groups) {
return groups.map(function (group) {
return groups.filter(function (group) {
return group.attributes.length > 0;
}).map(function (group) {
var attrs = group.attributes,
grouped_on = attrs.grouped_on instanceof Array
? attrs.grouped_on : [attrs.grouped_on],