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

Hello there, I want to Remove Checkbox from tree view in wizard in odoo v16.

Here is the code,

def view_tree(self): 
return {
'name': "My List View",
'res_model': 'your.model',
'view_mode': 'tree,form',
'target': 'current', 
'domain': [],
'flags': {'hasSelectors': False},
'context': {}, 
'type': 'ir.actions.act_window',
}

I used ... 'flags': {'hasSelectors': False}, in OdooV15 and it worked there but not working in OdooV16


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

In Odoo v16, you can remove the checkboxes from the tree view in a wizard by setting the "selectable" attribute to "none" in the view's xml definition.

Here is an example:

...

You can also remove the checkboxes from the tree view by setting the "selectable" attribute to "none" directly in the action definition, like this:

In both cases, setting the "selectable" attribute to "none" will remove the checkboxes from the tree view and prevent users from selecting multiple records.

Ảnh đại diện
Huỷ bỏ
Tác giả

Thankyou

I don't have this "selectable" attribute . Could you please give an example?

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 12 24
3373
1
thg 10 24
1532
0
thg 11 23
1007
0
thg 10 23
1707
0
thg 4 25
5489