Correctly get action_id when instanciating a Wizard
In case a Wizard is instanciated with an action (eg. when being called from a StateAction from another wizard) the data structure received is a dictionary and not an instance of Action. issue5465 review25031002
This commit is contained in:
1 parent
758adbe6be
commit
a0f4d5df62
2 files changed
+6
-1
No files matched your search
+1
-1
@@ -1076,7 +1076,7 @@ class Wizard(object):
|
||||
ctx['active_ids'] = None
|
||||
ctx['active_model'] = None
|
||||
if self.action:
|
||||
ctx['action_id'] = self.action.id
|
||||
ctx['action_id'] = self.action['id']
|
||||
else:
|
||||
ctx['action_id'] = None
|
||||
|
||||
|
||||
@@ -46,3 +46,8 @@ class TestWizard(ProteusTestCase):
|
||||
self.assertEqual(len(print_model_graph.actions), 0)
|
||||
print_model_graph.execute('update')
|
||||
self.assertEqual(len(print_model_graph.actions), 1)
|
||||
|
||||
def test_configuration_wizard(self):
|
||||
config_wizard = Wizard('ir.module.config_wizard')
|
||||
config_wizard.execute('action')
|
||||
self.assertTrue(config_wizard.actions)
|
||||
Reference in new issue
Block a user