From e2d2d51b7a7e9a77cb8b89e4adee35763e61201a Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Thu, 28 Nov 2013 15:51:55 +0100 Subject: [IMP] supports the attribute 'type' in the xml definition of the graph view, at least for bar_charts (addon web_graph) bzr revid: ged@openerp.com-20131128145155-b5w4fhw9vrp9txuc --- addons/web_graph/static/src/js/graph.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'addons/web_graph/static/src/js/graph.js') diff --git a/addons/web_graph/static/src/js/graph.js b/addons/web_graph/static/src/js/graph.js index 450a86a470a..77f444948b5 100644 --- a/addons/web_graph/static/src/js/graph.js +++ b/addons/web_graph/static/src/js/graph.js @@ -122,6 +122,10 @@ instance.web_graph.GraphView = instance.web.View.extend({ model = new instance.web.Model(fields_view_get.model, {group_by_no_leaf: true}), row_groupby = []; + if (fields_view_get.arch.attrs.type === 'bar') { + this.mode = 'bar_chart'; + } + // get the default groupbys and measure defined in the field view _.each(fields_view_get.arch.children, function (field) { if ('name' in field.attrs) { -- cgit v1.2.3