From 863fdc0808da90278ed86ee18877aca37045e387 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 29 Aug 2011 10:29:29 +0200 Subject: [PATCH] [FIX] reinstate bail out in clean_action in case the action is not an act_window bzr revid: xmo@openerp.com-20110829082929-c6uhkcq0wmiis2wp --- addons/base/controllers/main.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/base/controllers/main.py b/addons/base/controllers/main.py index 56ce25476c5..562571f10de 100644 --- a/addons/base/controllers/main.py +++ b/addons/base/controllers/main.py @@ -432,10 +432,13 @@ def load_actions_from_ir_values(req, key, key2, models, meta): for id, name, action in actions] def clean_action(req, action): + action.setdefault('flags', {}) + if action['type'] != 'ir.actions.act_window': + return action + context = req.session.eval_context(req.context) eval_ctx = req.session.evaluation_context(context) - action.setdefault('flags', {}) - + # values come from the server, we can just eval them if isinstance(action.get('context'), basestring): action['context'] = eval( action['context'], eval_ctx ) or {}