[FIX] display 'undefined' in case of falsy graph value rather than empty label

bzr revid: xmo@openerp.com-20130610071151-15lhz4o95tl4clak
This commit is contained in:
Xavier Morel
2013-06-10 09:11:51 +02:00
+2 -1
View File
@@ -5,6 +5,7 @@
openerp.web_graph = function (instance) {
var _lt = instance.web._lt;
var _t = instance.web._t;
// removed ``undefined`` values
var filter_values = function (o) {
@@ -365,7 +366,7 @@ instance.web_graph.GraphView = instance.web.View.extend({
}).then(function() {
var res = {
'data': result,
'ticks': _.map(ticks, function(el, key) { return [el, key] })
'ticks': _.map(ticks, function(el, key) { return [el, key || _t("Undefined")] })
};
return res;
}));