From cc4bf70f1baa7920a278832ea4ab6b47d4e6737d Mon Sep 17 00:00:00 2001 From: "Ysa (Open ERP)" Date: Tue, 9 Feb 2010 15:41:32 +0530 Subject: [PATCH] [IMP] workflow get_graph method keep in comment bzr revid: ysa@tinyerp.co.in-20100209101132-kem10xbj4at56l0f --- bin/addons/base/ir/workflow/workflow.py | 68 ++++++++++++------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/bin/addons/base/ir/workflow/workflow.py b/bin/addons/base/ir/workflow/workflow.py index 89e18a08fb4..bc51ee1f8e4 100644 --- a/bin/addons/base/ir/workflow/workflow.py +++ b/bin/addons/base/ir/workflow/workflow.py @@ -49,40 +49,40 @@ class workflow(osv.osv): # - def graph_get(self, cr, uid, id, scale, context={}): - - nodes= [] - nodes_name = [] - transitions = [] - start = [] - tres = {} - no_ancester = [] - workflow = self.browse(cr, uid, id, context) - for a in workflow.activities: - nodes_name.append((a.id,a.name)) - nodes.append(a.id) - if a.flow_start: - start.append(a.id) - else: - if not a.in_transitions: - no_ancester.append(a.id) - - for t in a.out_transitions: - transitions.append((a.id, t.act_to.id)) - tres[t.id] = (a.id, t.act_to.id) - - - g = graph(nodes, transitions, no_ancester) - g.process(start) - g.scale(*scale) - result = g.result_get() - results = {} - - for node in nodes_name: - results[str(node[0])] = result[node[0]] - results[str(node[0])]['name'] = node[1] - - return {'nodes': results, 'transitions': tres} +# def graph_get(self, cr, uid, id, scale, context={}): +# +# nodes= [] +# nodes_name = [] +# transitions = [] +# start = [] +# tres = {} +# no_ancester = [] +# workflow = self.browse(cr, uid, id, context) +# for a in workflow.activities: +# nodes_name.append((a.id,a.name)) +# nodes.append(a.id) +# if a.flow_start: +# start.append(a.id) +# else: +# if not a.in_transitions: +# no_ancester.append(a.id) +# +# for t in a.out_transitions: +# transitions.append((a.id, t.act_to.id)) +# tres[t.id] = (a.id, t.act_to.id) +# +# +# g = graph(nodes, transitions, no_ancester) +# g.process(start) +# g.scale(*scale) +# result = g.result_get() +# results = {} +# +# for node in nodes_name: +# results[str(node[0])] = result[node[0]] +# results[str(node[0])]['name'] = node[1] +# +# return {'nodes': results, 'transitions': tres} def create(self, cr, user, vals, context=None):