[FIX] value used by graph based on selection fields when opening lists

bzr revid: xmo@openerp.com-20120116121727-1x30vp9ffs7qotpr
This commit is contained in:
Xavier Morel
2012-01-16 13:17:27 +01:00
+5
View File
@@ -389,6 +389,11 @@ openerp.web_graph.GraphView = openerp.web.View.extend({
// unconditionally nuke tooltips before switching view
$(".dhx_tooltip").remove('div');
id = id[this.abscissa];
if(this.fields[this.abscissa].type == "selection"){
id = _.detect(this.fields[this.abscissa].selection,function(select_value){
return _.include(select_value, id);
});
}
if (typeof id == 'object'){
id = id[0];
}