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

how can I set a specific column's width in One2many field's tree view in odoo 13?

아바타
취소
베스트 답변

Hi,

Try giving style for the field as inline for the tree view of one2many field.

eg: 

<field name="name" width="100px"/>.


Hope it helps

아바타
취소
베스트 답변

Please goto one2many field tree and add custom class and define CSS, and use data-name of field to mapp 

I have done like this is . 


custom_size
.custom_size th.o_column_sortable[data-name="name"]{
width:300px !important;
max-width:300px !important;
}

i have use this for name column  or name field 


아바타
취소
베스트 답변

After a lot of searching I found a solution...I put it in my comments

아바타
취소

After a lot of searching I found a solution... with the width attribute with xpath:
<xpath expr="//field[@name='order_line']/tree/field[@name='product_id']" position="attributes">
<attribute name="width" >170px</attribute>.
</xpath>

베스트 답변

I don't think it is possible to simply set the width in tree view. I've tried but I couldn't. 

아바타
취소