summaryrefslogtreecommitdiff
path: root/addons/web_graph/controllers
diff options
context:
space:
mode:
authorBhumi Thakkar (Open ERP) <bth@tinyerp.com>2012-09-17 16:33:46 +0530
committerBhumi Thakkar (Open ERP) <bth@tinyerp.com>2012-09-17 16:33:46 +0530
commit29ff1bf82aba1274641bf35d5f3cf53bb751ffa4 (patch)
tree481d1dcf40ff4b230291562e9caf82e0ec47b1b6 /addons/web_graph/controllers
parentc7fc374a8eea8264760b25ff0def12d660d19fd9 (diff)
[IMP] Improve code for return value of selection field.
bzr revid: bth@tinyerp.com-20120917110346-0daw7ho3y31zbpu3
Diffstat (limited to 'addons/web_graph/controllers')
-rw-r--r--addons/web_graph/controllers/graph.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/web_graph/controllers/graph.py b/addons/web_graph/controllers/graph.py
index f6c1343c042..1da5e3bc91f 100644
--- a/addons/web_graph/controllers/graph.py
+++ b/addons/web_graph/controllers/graph.py
@@ -53,6 +53,9 @@ class GraphView(View):
if fields[field]['type']=='many2one':
data = data and data[1]
if tick:
+ if fields[field]['type']=='selection':
+ d = dict(fields[field]['selection'])
+ data = d[data]
return ticks.setdefault(data, len(ticks))
return data or 0