콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다

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


아바타
취소
베스트 답변

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.

아바타
취소
작성자

Thankyou

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

관련 게시물 답글 화면 활동
2
12월 24
3533
1
10월 24
1757
0
11월 23
1120
0
10월 23
1858
0
4월 25
5673