summaryrefslogtreecommitdiff
path: root/bin/tools/graph.py
diff options
context:
space:
mode:
authorKSH(Axelor) <>2010-02-04 12:55:19 +0530
committerJay (Open ERP) <jvo@tinyerp.com>2010-02-04 12:55:19 +0530
commit64fb43920c0a78d65263aa37b7d6c2d5460cc5fe (patch)
tree976ca1c6620a90e0c2ff7d677974935ad847b8f4 /bin/tools/graph.py
parentb67c51749708ea411a780f062aae8e5e0032f2f1 (diff)
[FIX] Graph : report corrected
lp bug: https://launchpad.net/bugs/516044 fixed bzr revid: jvo@tinyerp.com-20100204072519-7r6yu5g3r8qxlhm4
Diffstat (limited to 'bin/tools/graph.py')
-rw-r--r--bin/tools/graph.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/bin/tools/graph.py b/bin/tools/graph.py
index d6a26deb3c2..029bc873e9d 100644
--- a/bin/tools/graph.py
+++ b/bin/tools/graph.py
@@ -763,16 +763,20 @@ if __name__=='__main__':
import ImageDraw
img = Image.new("RGB", (800, 600), "#ffffff")
draw = ImageDraw.Draw(img)
-
- for name,node in g.result.items():
+
+ result = g.result_get()
+ node_res = {}
+ for node in nodes:
+ node_res[node] = result[node]
+
+ for name,node in node_res.items():
+
draw.arc( (int(node['y']-radius), int(node['x']-radius),int(node['y']+radius), int(node['x']+radius) ), 0, 360, (128,128,128))
draw.text( (int(node['y']), int(node['x'])), name, (128,128,128))
- for nodefrom in g.transitions:
- for nodeto in g.transitions[nodefrom]:
- draw.line( (int(g.result[nodefrom]['y']), int(g.result[nodefrom]['x']),int(g.result[nodeto]['y']),int(g.result[nodeto]['x'])),(128,128,128) )
-
+ for t in transitions:
+ draw.line( (int(node_res[t[0]]['y']), int(node_res[t[0]]['x']),int(node_res[t[1]]['y']),int(node_res[t[1]]['x'])),(128,128,128) )
img.save("graph.png", "PNG")