diff options
| author | Fabien Pinckaers <fp@tinyerp.com> | 2012-09-17 18:37:40 +0200 |
|---|---|---|
| committer | Fabien Pinckaers <fp@tinyerp.com> | 2012-09-17 18:37:40 +0200 |
| commit | f325ec810f0d406bd509525d17c10052f4aab634 (patch) | |
| tree | 32535781eaa08cfb51c2c7fa01e95f8255adf1e9 /addons/web_graph/controllers/graph.py | |
| parent | bfaaf55f9f52c57cca39ade6423f8eeb8fccc896 (diff) | |
| parent | 29ff1bf82aba1274641bf35d5f3cf53bb751ffa4 (diff) | |
[FIX] web graphs for selections
bzr revid: fp@tinyerp.com-20120917163740-l6cb5dhpgyhl3c50
Diffstat (limited to 'addons/web_graph/controllers/graph.py')
| -rw-r--r-- | addons/web_graph/controllers/graph.py | 3 |
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..e5c15898155 100644 --- a/addons/web_graph/controllers/graph.py +++ b/addons/web_graph/controllers/graph.py @@ -52,6 +52,9 @@ class GraphView(View): def _convert(field, data, tick=True): if fields[field]['type']=='many2one': data = data and data[1] + elif (fields[field]['type']=='selection') and (type(fields[field]['selection']) in (list, tuple)): + d = dict(fields[field]['selection']) + data = d[data] if tick: return ticks.setdefault(data, len(ticks)) return data or 0 |
