Skip to Content
Menu
This question has been flagged
1 Reply
3892 Views

Hi,

I have made an wizard that returns me a view. My Problem is now, that my return view don't have any access to change the view type like kanban, tree ... Is there a way to do that?

Here is my code:

@api.multi
def open_filter_view(self):
domain = self._add_domain()
context = self._add_context()
  if self.options == 'option_1':
view_item = [(self.env.ref('test_module_wizard.test_tree_view').id, 'tree')]
else:
view_item = [(self.env.ref('test_module_wizard.test_tree_view').id, 'tree')]
view = self.env.ref('test_export.test_action')
return {
'name': _('Entries'),
'view_type': 'form',
'view_mode': 'tree,kanban,form',
'view_id': view.id,
'views': view_item,
'res_model': 'account.move.line',
'context': context,
'type': 'ir.actions.act_window',
'limit': 5000,
'domain': domain,
'target': 'current',
}

It looks like this:


It should look like this after the return wizard:



When I check in the debug mod the Action. it's empty, why is that so?

Avatar
Discard
Best Answer

Wizard problem? like your nickname?

No, it's not a wizard problem, it's a problem introduced in the v10 Odoo version for non multi views like form view meaning that the view switcher gets hide when the form view it's loaded, because it's not a multi record view. I find it an usability issue but Odoo made it that way

Avatar
Discard
Related Posts Replies Views Activity
2
Feb 18
4907
0
Oct 23
590
2
Dec 19
1646
0
Nov 18
2262
4
Oct 18
7095