Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4514 Lượt xem

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?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 2 18
5674
0
thg 10 23
1695
2
thg 12 19
3036
0
thg 11 18
3292
4
thg 10 18
8489