Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
6613 มุมมอง

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>

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
พ.ย. 16
8476
0
ม.ค. 21
3097
4
ธ.ค. 19
7196
4
ก.พ. 24
11730
3
พ.ย. 21
2509