[FIX]Fixed the issue of process view, here condition must be given more priority then node state, but instead of it here the thing was reverse, node state has given more priority.
bzr revid: msh@tinyerp.com-20120529110705-5ggbxuytkeykr4cy
This commit is contained in:
+14
-14
@@ -131,21 +131,21 @@ class process_process(osv.osv):
|
||||
if node.menu_id:
|
||||
data['menu'] = {'name': node.menu_id.complete_name, 'id': node.menu_id.id}
|
||||
|
||||
if node.model_id and node.model_id.model == res_model:
|
||||
try:
|
||||
data['active'] = eval(node.model_states, expr_context)
|
||||
except Exception:
|
||||
pass
|
||||
try:
|
||||
gray = True
|
||||
for cond in node.condition_ids:
|
||||
if cond.model_id and cond.model_id.model == res_model:
|
||||
gray = gray and eval(cond.model_states, expr_context)
|
||||
data['gray'] = not gray
|
||||
except:
|
||||
pass
|
||||
|
||||
if not data['active']:
|
||||
try:
|
||||
gray = True
|
||||
for cond in node.condition_ids:
|
||||
if cond.model_id and cond.model_id.model == res_model:
|
||||
gray = gray and eval(cond.model_states, expr_context)
|
||||
data['gray'] = not gray
|
||||
except:
|
||||
pass
|
||||
if not data['gray']:
|
||||
if node.model_id and node.model_id.model == res_model:
|
||||
try:
|
||||
data['active'] = eval(node.model_states, expr_context)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
nodes[node.id] = data
|
||||
if node.flow_start:
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
<record id="process_condition_conditionorigin" model="process.condition">
|
||||
<field name="model_id" ref="purchase.model_purchase_order"/>
|
||||
<field name="node_id" ref="process_node_draftpurchaseorder1"/>
|
||||
<field eval=""""object.origin==''"""" name="model_states"/>
|
||||
<field eval=""""object.origin==False"""" name="model_states"/>
|
||||
<field eval=""""condition_origin"""" name="name"/>
|
||||
</record>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user