From 3b4b241f0e20cc7c72b37c898fa2fcf912f2327a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 19 May 2009 18:08:09 +0200 Subject: [PATCH] Fix get_action_id to skip active_test when searching for issue1055 --- trytond/ir/action.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/trytond/ir/action.py b/trytond/ir/action.py index 432002f8d9..5ee3c4ad5e 100644 --- a/trytond/ir/action.py +++ b/trytond/ir/action.py @@ -34,9 +34,13 @@ class Action(ModelSQL, ModelView): return True def get_action_id(self, cursor, user, action_id, context=None): + if context is None: + context = {} + ctx = context.copy() + ctx['active_test'] = False if self.search(cursor, user, [ ('id', '=', action_id), - ], context=context): + ], context=ctx): return action_id for action_type in ( 'ir.action.report', @@ -47,7 +51,7 @@ class Action(ModelSQL, ModelView): action_obj = self.pool.get(action_type) action_id2 = action_obj.search(cursor, user, [ ('id', '=', action_id), - ], context=context) + ], context=ctx) if action_id2: action = action_obj.browse(cursor, user, action_id2[0], context=context)