Use new search API.
The search method returns records now so browse is no longer needed. issue3004 review672002
This commit is contained in:
1 parent
238750fe48
commit
32e28ccd63
1 file changed
+3
-3
@@ -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
|
||||
|
||||
Reference in new issue
Block a user