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

Hello,

Using Odoo 11 Community. When there is a text field in a form view, if in enter a lot of text in that field and save, the form view become very large with a horizontal scroll bar. Does somebeody have a solution the let the form view fit to screen size? I don't know why the form view doesn't automatically wrap the text of the text view...

I have the same case when I use the odoo default skin or Material/United Backend Theme (https://www.odoo.com/apps/themes/11.0/backend_theme_v11/).

Thanks

อวตาร
ละทิ้ง
ผู้เขียน

By the way, the form view is shown as "current" and not as "new" (popup). When it's in a new view, like a popup, I doesn't have the problem.

คำตอบที่ดีที่สุด

Hi Evans,
Please add to your style the following : word-break: break-word;

Ex: 

<field name="Field1" style="word-break: break-word;"/>

If it does not work, add white-space: normal;

like this :

<field name="Field1" style="white-space: normal;word-break: break-word;"/>

Upvote if this helps.
Thank you
อวตาร
ละทิ้ง
ผู้เขียน

Unfortunately, it's not working. Maybe if it can change something, my field use the html widget.

Thanks

Is there any whitespace in your text?

ผู้เขียน

Yep, it's a normal text with whitespace.

คำตอบที่ดีที่สุด

Hi,

try to use <div class="oe_clear"/> after the final element on the form (before <form/>)

อวตาร
ละทิ้ง
ผู้เขียน

Unfortunately, it's not working. Thanks anyway

คำตอบที่ดีที่สุด

Are you sure it's a fields.Text field? If it's a fields.Char field then you would see similar issues.

อวตาร
ละทิ้ง
ผู้เขียน

Yep, it's a "fields.Text" field. I use it to enter a description using HTML widget. I tried without HTML widget and I have the same issue. My text field is on column 1 of a 2 columns forms (under <group>)

Related Posts ตอบกลับ มุมมอง กิจกรรม
V17 Tree, Form view แก้ไขแล้ว
1
มี.ค. 25
2021
3
ก.พ. 21
27405
2
ก.พ. 25
3169
Odoo18: Run python code when form loads แก้ไขแล้ว
2
ธ.ค. 24
2325
2
พ.ค. 24
2690