summaryrefslogtreecommitdiff
path: root/addons/web_graph/static/src
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web_graph/static/src')
-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) {