From 24e03ae890325d67794d844b1c5c2eb8d7389bff Mon Sep 17 00:00:00 2001 From: Amit Mendapara Date: Wed, 17 Sep 2008 19:07:18 +0530 Subject: process.graph_get returns more info bzr revid: ame@tinyerp.com-20080917133718-tync46ybwjup7cv6 --- addons/process/process.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'addons/process/process.py') diff --git a/addons/process/process.py b/addons/process/process.py index a89b6a6caaa..0a8be26995b 100644 --- a/addons/process/process.py +++ b/addons/process/process.py @@ -59,6 +59,7 @@ class process_process(osv.osv): data['menu'] = (node.menu_id or None) and node.menu_id.name data['model'] = (node.model_id or None) and node.model_id.model data['kind'] = node.kind + data['notes'] = node.note data['active'] = 0 if node.kind == "state" and node.model_id and node.model_id.model == res_model: @@ -83,10 +84,13 @@ class process_process(osv.osv): data['name'] = tr.name data['source'] = tr.source_node_id.id data['target'] = tr.target_node_id.id + data['notes'] = tr.note data['buttons'] = buttons = [] for b in tr.action_ids: button = {} button['name'] = b.name + button['state'] = b.state + button['action'] = b.action buttons.append(button) data['roles'] = roles = [] for r in tr.transition_ids: -- cgit v1.2.3 From c0b8a50ba1b425d0574efcff7d749be2a1818e03 Mon Sep 17 00:00:00 2001 From: Amit Mendapara Date: Wed, 17 Sep 2008 19:53:44 +0530 Subject: Fixed process (active node). bzr revid: ame@tinyerp.com-20080917142344-s3opqj63azmm5jqg --- addons/process/process.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/process/process.py') diff --git a/addons/process/process.py b/addons/process/process.py index 0a8be26995b..74b0d6fc036 100644 --- a/addons/process/process.py +++ b/addons/process/process.py @@ -65,7 +65,7 @@ class process_process(osv.osv): if node.kind == "state" and node.model_id and node.model_id.model == res_model: states = node.model_states states = (states or []) and states.split(',') - data['active'] = (states and current_object.state in states) or not states + data['active'] = not states or current_object.state in states elif node.kind == "router": #TODO: -- cgit v1.2.3