[IMP] diagram :- add multiple label on edge.

bzr revid: ysa@tinyerp.co.in-20100413131840-z4luf0k0znjnjrap
This commit is contained in:
Ysa (Open ERP) 2010-04-13 18:48:40 +05:30
parent 8a481e4fa2
commit a658362fae
2 changed files with 8 additions and 4 deletions

View File

@ -177,9 +177,13 @@ class view(osv.osv):
for t in _Arrow_Obj.read(cr,uid, a[_Destination_Field],[]):
transitions.append((a['id'], t[des_node][0]))
tres[str(t['id'])] = (a['id'],t[des_node][0])
if t.has_key(str(label)) and str(t[label])=='False':
t[label]=' '
labels[str(t['id'])] = (a['id'],t.get(label,' '))
label_string = ""
for lbl in eval(label):
if t.has_key(str(lbl)) and str(t[lbl])=='False':
label_string = label_string + ' '
else:
label_string = label_string + " " + t[lbl]
labels[str(t['id'])] = (a['id'],label_string)
g = graph(nodes, transitions, no_ancester)
g.process(start)
g.scale(*scale)

View File

@ -34,7 +34,7 @@
<field name="name"/>
<field name="kind"/>
</node>
<arrow object="workflow.transition" source="act_from" destination="act_to" label="signal">
<arrow object="workflow.transition" source="act_from" destination="act_to" label="['signal','condition']">
<field name="act_from"/>
<field name="act_to"/>
<field name="signal"/>