From c138b778df3055dad9e1add03deaf5b519e7581f Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Wed, 2 Apr 2014 13:47:58 +0200 Subject: [PATCH] [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 --- addons/web_graph/static/src/js/pivot_table.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/web_graph/static/src/js/pivot_table.js b/addons/web_graph/static/src/js/pivot_table.js index e8a438b3fe5..824b41a6b25 100644 --- a/addons/web_graph/static/src/js/pivot_table.js +++ b/addons/web_graph/static/src/js/pivot_table.js @@ -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],