Fix get_action_id to skip active_test when searching for issue1055

This commit is contained in:
Cédric Krier committed 2009-05-19 18:08:09 +02:00
1 parent cbf621c064
commit 3b4b241f0e
1 file changed
+6 -2
+6 -2
View File
@@ -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)