process graph_get returns more info.

bzr revid: ame@tinyerp.com-20080912140331-chp9afy88vywsxyd
This commit is contained in:
Amit Mendapara
2008-09-12 19:33:31 +05:30
parent 5c58e5d12b
commit abe80b1acf
+12
View File
@@ -74,6 +74,18 @@ class process_process(osv.osv):
data['source'] = tr.node_from_id.id
data['target'] = tr.node_to_id.id
data['buttons'] = buttons = []
for b in tr.action_ids:
button = {}
button['name'] = b.name
buttons.append(button)
data['roles'] = roles = []
for r in tr.transition_ids:
role = {}
role['name'] = r.role_id.name
roles.append(role)
transitions[tr.id] = data
g = tools.graph(nodes.keys(), map(lambda x: (x['source'], x['target']), transitions.values()))