diff --git a/addons/web_graph/static/src/js/graph_view.js b/addons/web_graph/static/src/js/graph_view.js index 25a1f932cc4..b4b2fb38f06 100644 --- a/addons/web_graph/static/src/js/graph_view.js +++ b/addons/web_graph/static/src/js/graph_view.js @@ -86,6 +86,7 @@ instance.web_graph.GraphView = instance.web.View.extend({ col_group_by = groupbys.col_group_by; if (!this.graph_widget) { + this.widget_config.context = context; if (group_by.length) { this.widget_config.row_groupby = group_by; } diff --git a/addons/web_graph/static/src/js/pivot_table.js b/addons/web_graph/static/src/js/pivot_table.js index 7de629a95c2..2d68cb43932 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.model = model; this.fields = fields; @@ -379,6 +380,7 @@ openerp.web_graph.PivotTable = openerp.web.Class.extend({ return this.model.query(field_ids) .filter(domain) + .context(this.context) .group_by(groupby.field) .then(function (results) { var groups = _.filter(results, function (group) {