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

Hi everyone,


A table with a lot of columns shows like this:



If I add an item and refresh, it adjusts the width properly and shows the scroll bar at the bottom.


What can I do to specify a minimum width per column? Any idea why is it showing properly when there are items in the lists and trying to squeeze everything without a scroll bar when empty?


Thanks!

아바타
취소
베스트 답변

Hi,

Try giving style for the field.

eg: 

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




Hope it helps

아바타
취소

This doesn't work, you should try your solution first before posting it here. Posting random solutions and not trying whether or not they work makes us developers lose a lot of time.

베스트 답변

Hi Emilio San Jose,


For this, you can specify width="d%" in fields of any table(One2many)

Please find code in comment. 

Here, I have passed 80% width for attribute_id and 40% for value_ids.


Feel free to contact us for further assistance

Thanks & Regards,
Email:   odoo@aktivsoftware.com   

Skype: kalpeshmaheshwari

아바타
취소

Please find code here :-

EX:

<field name="attribute_line_ids" widget="one2many" context="{'show_attribute': False}">
<tree string="Variants" editable="bottom" decoration-info="value_count &lt;= 1">
<field name="attribute_id" attrs="{'readonly': [('id', '!=', False)]}" width="80%"/>
<field name="value_ids" widget="many2many_tags" width="20%"/>
</tree>
</field>

관련 게시물 답글 화면 활동
1
11월 16
8538
0
1월 21
3131
4
12월 19
7242
4
2월 24
11792
3
11월 21
2543