Use new search API.

The search method returns records now so browse is no longer needed.

issue3004
review672002
This commit is contained in:
Ian Wilson committed 2013-02-15 14:06:13 -08:00
1 parent 238750fe48
commit 32e28ccd63
1 file changed
+3 -3
+3 -3
View File
@@ -72,11 +72,11 @@ class Action(ModelSQL, ModelView):
'ir.action.url',
):
Action = pool.get(action_type)
action_id2 = Action.search([
actions = Action.search([
('id', '=', action_id),
])
if action_id2:
action = Action.browse(action_id2[0])
if actions:
action, = actions
return action.action.id
@classmethod