[IMP] makes the graph view in pivot table mode always display 'Total' instead of the current measure/title (addon web_graph)

bzr revid: ged@openerp.com-20140128132625-pk21iuhuffvx6814
This commit is contained in:
Gery Debongnie 2014-01-28 14:26:25 +01:00
parent 31374c2eef
commit ad76309fbe
2 changed files with 1 additions and 8 deletions

View File

@ -21,7 +21,6 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({
this.domain = domain;
this.mode = options.mode || 'pivot'; // pivot, bar, pie, line
this.heatmap_mode = options.heatmap_mode || 'none';
this.title = options.title || 'Graph';
this.visible_ui = options.visible_ui || true;
this.bar_ui = options.bar_ui || 'group';
this.graph_view = options.graph_view || null;
@ -384,12 +383,6 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({
// Drawing the table
// ----------------------------------------------------------------------
draw_table: function () {
this.pivot.main_row().title = _t('Total');
if (this.pivot.measures.length == 1) {
this.pivot.main_col().title = this.pivot.measures[0].string;
} else {
this.pivot.main_col().title = _t(this.title);
}
this.draw_top_headers();
_.each(this.pivot.rows.headers, this.proxy('draw_row'));
},

View File

@ -238,7 +238,7 @@ openerp.web_graph.PivotTable = openerp.web.Class.extend({
},
make_header: function (group, parent) {
var title = parent ? group.attributes.value : '';
var title = parent ? group.attributes.value : _t('Total');
return {
id: _.uniqueId(),
path: parent ? parent.path.concat(title) : [],