From 0d3bf8d1a21cae4d8bb70009fc34ad3520ca224c Mon Sep 17 00:00:00 2001 From: msh-openerp Date: Tue, 29 May 2012 16:37:05 +0530 Subject: [PATCH] [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 --- addons/process/process.py | 30 +++++++++++++------------- addons/purchase/process/purchase_process.xml | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/addons/process/process.py b/addons/process/process.py index 524a323..464cf46 100644 --- a/addons/process/process.py +++ b/addons/process/process.py @@ -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 - - 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 + 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: diff --git a/addons/purchase/process/purchase_process.xml b/addons/purchase/process/purchase_process.xml index ddf557f..e01f6a4 100644 --- a/addons/purchase/process/purchase_process.xml +++ b/addons/purchase/process/purchase_process.xml @@ -135,7 +135,7 @@ - + -- 1.7.10.4