summaryrefslogtreecommitdiff
path: root/addons/web_graph/static/src
diff options
context:
space:
mode:
authorGery Debongnie <ged@openerp.com>2014-04-03 11:40:50 +0200
committerGery Debongnie <ged@openerp.com>2014-04-03 11:40:50 +0200
commit0d4732b5c4194c7c25a13266dfdd1aed05e534eb (patch)
tree9844e30180d9e96cc115fe69e778bdebecca8f96 /addons/web_graph/static/src
parent729cd2ce023d8919aa1b250a4b51bf416cc12117 (diff)
[FIX] makes sure the internal data structure of pivot table is correct after update_data (the children were not correct when the tree of headers was not full, after an expand for example (addon web_graph)
bzr revid: ged@openerp.com-20140403094050-vjeq4dks86mejuub
Diffstat (limited to 'addons/web_graph/static/src')
-rw-r--r--addons/web_graph/static/src/js/pivot_table.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web_graph/static/src/js/pivot_table.js b/addons/web_graph/static/src/js/pivot_table.js
index 9231765c485..309bb103fa8 100644
--- a/addons/web_graph/static/src/js/pivot_table.js
+++ b/addons/web_graph/static/src/js/pivot_table.js
@@ -219,8 +219,7 @@ openerp.web_graph.PivotTable = openerp.web.Class.extend({
header.root.groupby.push(groupby);
}
return this.perform_requests(this_gb, other_gbs, header.domain).then(function () {
- var data = Array.prototype.slice.call(arguments);
- data = data.slice(other_gbs.length + 1, data.length);
+ var data = Array.prototype.slice.call(arguments).slice(other_gbs.length + 1);
_.each(data, function (data_pt) {
self.make_headers_and_cell(
data_pt, header.root.headers, other_root.headers, 1, header.path, true);
@@ -369,6 +368,7 @@ openerp.web_graph.PivotTable = openerp.web.Class.extend({
}
if (corresponding_header && (!header.expanded)) {
corresponding_header.expanded = false;
+ corresponding_header.children = [];
}
});
var updated_headers = _.filter(new_headers, function (header) {