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

On odoo 16 if there are too many columns on tree view it does not auto adjust the width.

Is there any syntax or module which help to adjust the tree view columns?

아바타
취소
베스트 답변

Hi,

Try this code below to adjust the width,

th.o_column_sortable[data-name="field_name"]

width:150px !important; 

max-width:150px !important;

 } 


Hope it helps

아바타
취소
베스트 답변

Hi, 
define scss file in your module and add the following lines

.manual_entry_tree table.o_list_table thead th[data-name] {

  width: 150px !important;

  white-space: nowrap;

  overflow: hidden;

  text-overflow: ellipsis;

}


.manual_entry_tree table.o_list_table tbody td[data-name] {
  width: 150px !important;

  white-space: nowrap;

  overflow: hidden;

  text-overflow: ellipsis;

}

then on your tree use class="manual_entry_tree"
make sure you have added the scss file in assets-> web.assets_backend

아바타
취소
베스트 답변

This solution worked for me.

This is how I used it:

I added a new class to the tree view (In my case, it was Description field in sale order lines)


order_line_tree


Used following scss

.order_line_tree > table > thead > tr > th.o_column_sortable[data-name='name']{
width:200px !important;
max-width:200px !important;
}


Thank you for the help :)

아바타
취소
베스트 답변

Thanks cybrosis, can you give more detailed information ?

아바타
취소
관련 게시물 답글 화면 활동
3
8월 25
2572
1
5월 25
2616
1
4월 25
3595
1
4월 25
4458
1
4월 25
1923