[FIX]graph view usability bug.
authorVidhin Mehta <vme@tinyerp.com>
Fri, 25 Jan 2013 07:02:40 +0000 (12:32 +0530)
committerVidhin Mehta <vme@tinyerp.com>
Fri, 25 Jan 2013 07:02:40 +0000 (12:32 +0530)
bzr revid: vme@tinyerp.com-20130125070240-0drtmiyetwu2btc6

addons/web_graph/static/src/js/graph.js

index 35ad0aa..28e1cf6 100644 (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;
         });