Process title with current resource info.
bzr revid: ame@tinyerp.com-20080922145928-d1llezo3shuxw6az
This commit is contained in:
parent
c8f452b000
commit
15b7e9b6b6
|
@ -103,12 +103,15 @@ class process_process(osv.osv):
|
|||
ret['id'] = rel.id
|
||||
|
||||
return ret
|
||||
|
||||
|
||||
notes = process.note
|
||||
nodes = {}
|
||||
start = []
|
||||
transitions = {}
|
||||
|
||||
states = dict(pool.get(res_model).fields_get(cr, uid, context=context).get('state', {}).get('selection', {}))
|
||||
title = "%s - Resource: %s, State: %s" % (process.name, current_object.name, states.get(getattr(current_object, 'state'), 'N/A'))
|
||||
|
||||
for node in process.node_ids:
|
||||
data = {}
|
||||
data['name'] = node.name
|
||||
|
@ -180,8 +183,8 @@ class process_process(osv.osv):
|
|||
#g.scale(100, 100, 180, 120)
|
||||
g.scale(*scale)
|
||||
graph = g.result_get()
|
||||
miny = -1
|
||||
|
||||
miny = -1
|
||||
for k,v in nodes.items():
|
||||
x = graph[k]['y']
|
||||
y = graph[k]['x']
|
||||
|
@ -194,7 +197,8 @@ class process_process(osv.osv):
|
|||
for k, v in nodes.items():
|
||||
y = v['y']
|
||||
v['y'] = min(y - miny + 10, y)
|
||||
return dict(notes=notes, nodes=nodes, transitions=transitions)
|
||||
|
||||
return dict(title=title, notes=notes, nodes=nodes, transitions=transitions)
|
||||
|
||||
process_process()
|
||||
|
||||
|
|
Loading…
Reference in New Issue