[FIX] unscrew labels in graphs

bzr revid: xmo@openerp.com-20120215112424-meswcv2u60b0lxdi
This commit is contained in:
Xavier Morel 2012-02-15 12:24:24 +01:00
parent 8a5f5e1199
commit 8ad5f239f5
1 changed files with 3 additions and 2 deletions

View File

@ -216,11 +216,12 @@ openerp.web_graph.GraphView = openerp.web.View.extend({
.pluck(this.group_field)
.uniq()
.map(function (value, index) {
var groupval = '';
if(value) {
value = value.toLowerCase().replace(/[\s\/]+/g,'_');
groupval = value.toLowerCase().replace(/[\s\/]+/g,'_');
}
return {
group: _.str.sprintf('%s_%s', self.ordinate, value),
group: _.str.sprintf('%s_%s', self.ordinate, groupval),
text: value,
color: COLOR_PALETTE[index % COLOR_PALETTE.length]
};