[FIX]Refixed the issue of color of process node, here we forget to check for gray, if gray not available then and then we will go to check for active.
bzr revid: msh@tinyerp.com-20120530090956-h0uxm1c2pm4xjwkl
This commit is contained in:
commit
9cf6d7e4af
|
@ -68,6 +68,7 @@
|
|||
<field eval=""""Accounting"""" name="name"/>
|
||||
<field eval=""""Accounting entries."""" name="note"/>
|
||||
<field name="process_id" ref="process_process_supplierinvoiceprocess0"/>
|
||||
<field eval=""""object.state=='posted'"""" name="model_states"/>
|
||||
<field eval="0" name="flow_start"/>
|
||||
</record>
|
||||
|
||||
|
|
|
@ -118,6 +118,7 @@ class process_process(osv.osv):
|
|||
data['active'] = False
|
||||
data['gray'] = False
|
||||
data['url'] = node.help_url
|
||||
data['model_states'] = node.model_states
|
||||
|
||||
# get assosiated workflow
|
||||
if data['model']:
|
||||
|
@ -198,6 +199,12 @@ class process_process(osv.osv):
|
|||
resource['name'] = refobj.name_get(context)[0][1]
|
||||
resource['perm'] = pool.get(ref_model).perm_read(cr, uid, [ref_id], context)[0]
|
||||
|
||||
ref_expr_context = Env(refobj, current_user)
|
||||
try:
|
||||
if not nodes[nid]['gray']:
|
||||
nodes[nid]['active'] = eval(nodes[nid]['model_states'], ref_expr_context)
|
||||
except:
|
||||
pass
|
||||
for r in relatives:
|
||||
node = nodes[r]
|
||||
if 'res' not in node:
|
||||
|
|
Loading…
Reference in New Issue