summaryrefslogtreecommitdiff
path: root/addons/web_graph/static
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2014-10-01 19:18:14 +0200
committerChristophe Simonis <chs@odoo.com>2014-10-01 19:18:14 +0200
commit709c9868de7c4ac4985ed4e0055ae3e3e49742ad (patch)
treee90227a947bddf47b3043fcbe8b99529a22aa7dd /addons/web_graph/static
parent85f26244a71a0b9a7faa283d6d24fdde6bae899a (diff)
parente8831932464814ed5f9e3a0af33f98891a466417 (diff)
[MERGE] forward port of branch 8.0 up to e883193
Diffstat (limited to 'addons/web_graph/static')
-rw-r--r--addons/web_graph/static/src/js/graph_view.js2
-rw-r--r--addons/web_graph/static/src/js/graph_widget.js2
-rw-r--r--addons/web_graph/static/src/js/pivot_table.js2
3 files changed, 5 insertions, 1 deletions
diff --git a/addons/web_graph/static/src/js/graph_view.js b/addons/web_graph/static/src/js/graph_view.js
index 8ae99849bab..646a730b51b 100644
--- a/addons/web_graph/static/src/js/graph_view.js
+++ b/addons/web_graph/static/src/js/graph_view.js
@@ -85,6 +85,8 @@ instance.web_graph.GraphView = instance.web.View.extend({
measures = groupbys.measures;
if (!this.graph_widget) {
+ this.widget_config.context = _.clone(context);
+ this.widget_config.context.group_by_no_leaf = true;
if (group_by.length) {
this.widget_config.row_groupby = group_by;
}
diff --git a/addons/web_graph/static/src/js/graph_widget.js b/addons/web_graph/static/src/js/graph_widget.js
index 060eb70b514..97a5ad66d4e 100644
--- a/addons/web_graph/static/src/js/graph_widget.js
+++ b/addons/web_graph/static/src/js/graph_widget.js
@@ -389,7 +389,7 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({
var rows = self.build_rows(header.children);
var doc_fragment = $(document.createDocumentFragment());
rows.map(function (row) {
- doc_fragment.append(self.draw_row(row));
+ doc_fragment.append(self.draw_row(row, 0));
});
self.$row_clicked.after(doc_fragment);
} else {
diff --git a/addons/web_graph/static/src/js/pivot_table.js b/addons/web_graph/static/src/js/pivot_table.js
index b66bc41e98c..a46203faff5 100644
--- a/addons/web_graph/static/src/js/pivot_table.js
+++ b/addons/web_graph/static/src/js/pivot_table.js
@@ -13,6 +13,7 @@ openerp.web_graph.PivotTable = openerp.web.Class.extend({
init: function (model, domain, fields, options) {
this.cells = [];
this.domain = domain;
+ this.context = options.context;
this.no_data = true;
this.updating = false;
this.model = model;
@@ -412,6 +413,7 @@ openerp.web_graph.PivotTable = openerp.web.Class.extend({
var self = this;
return this.model.query(_.without(fields, '__count'))
.filter(domain)
+ .context(this.context)
.lazy(false)
.group_by(groupbys)
.then(function (groups) {