[IMP] diagram :- rename arrow attribute single to label.

bzr revid: ysa@tinyerp.co.in-20100413125753-oryt6quuq1x00nub
This commit is contained in:
Ysa (Open ERP) 2010-04-13 18:27:53 +05:30
parent eebbd52d8a
commit 8a481e4fa2
3 changed files with 8 additions and 8 deletions

View File

@ -132,13 +132,13 @@ class view(osv.osv):
return super(view, self).write(cr, uid, ids, vals, context)
def graph_get(self, cr, uid, id, model, node_obj, conn_obj, src_node, des_node,signal,scale,context={}):
def graph_get(self, cr, uid, id, model, node_obj, conn_obj, src_node, des_node,label,scale,context={}):
nodes=[]
nodes_name=[]
transitions=[]
start=[]
tres={}
sig={}
labels={}
no_ancester=[]
blank_nodes = []
@ -177,9 +177,9 @@ 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(signal)) and str(t[signal])=='False':
t[signal]=' '
sig[str(t['id'])] = (a['id'],t.get(signal,' '))
if t.has_key(str(label)) and str(t[label])=='False':
t[label]=' '
labels[str(t['id'])] = (a['id'],t.get(label,' '))
g = graph(nodes, transitions, no_ancester)
g.process(start)
g.scale(*scale)
@ -188,7 +188,7 @@ class view(osv.osv):
for node in nodes_name:
results[str(node[0])] = result[node[0]]
results[str(node[0])]['name'] = node[1]
return {'nodes': results, 'transitions': tres, 'signal' : sig, 'blank_nodes': blank_nodes}
return {'nodes': results, 'transitions': tres, 'label' : labels, 'blank_nodes': blank_nodes}
view()
class view_sc(osv.osv):

View File

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

View File

@ -63,7 +63,7 @@
<rng:attribute name="source" />
<rng:attribute name="destination" />
<rng:optional><rng:attribute name="form_view_ref"/></rng:optional>
<rng:optional><rng:attribute name="signal"/></rng:optional>
<rng:optional><rng:attribute name="label"/></rng:optional>
<rng:zeroOrMore>
<rng:choice>
<rng:ref name="field"/>