diff options
| author | msh-openerp <msh@tinyerp.com> | 2012-05-29 16:37:05 +0530 |
|---|---|---|
| committer | msh-openerp <msh@tinyerp.com> | 2012-05-29 16:37:05 +0530 |
| commit | 0d3bf8d1a21cae4d8bb70009fc34ad3520ca224c (patch) | |
| tree | 687e2483b571445f725714ce050df643bc454556 /addons/process/process.py | |
| parent | f0cc26e0cb18a4f85696695e1519751093f9f914 (diff) | |
[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
Diffstat (limited to 'addons/process/process.py')
| -rw-r--r-- | addons/process/process.py | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/addons/process/process.py b/addons/process/process.py index 524a3236e7b..464cf460616 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: |
