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

I wan't to know whether it's possible to display fields vertically by using css or xml. Currently it displays field label and value in horizontal way. E.g.

Field String  |  Field Value


I want fields to be displayed in following way.

 Field String

-------------------

Field Value

Field 1
Field 2
Field 3
Field 4
Field 5

----------
-----------
-------------
---------------
------------

I tired by putting multiple groups, it's little difficult to achieve above view using groups. Is there any easier way than groups? 

Could anybody help me displaying field string and value vertically as I explained above.

Thanks 

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hello,


You can use html and style inline and css...

So if you want a table like in your example...

You can write a table in xml view...

EG:


<group>
<table style='width:100%;' border='1'>
<tr>
<th style='width:40%; font-weight:bold'><label for="name"/></th>
<th style='width:20%; font-weight:bold'><label for="is_company"/></th>
<th style='width:40%; font-weight:bold'><label for="category_id"/></th>
</tr>
<tr>
<td><field name="name" default_focus="1" placeholder="Name"/></td>
<td><field name="parent_id"/></td>
<td><field name="category_id" widget="many2many_tags" placeholder="Tags..."/></td>
</tr>
</table>
</group>



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

Thanks Jeremy Kersten. I never thought about putting html tables in form view. It worked.

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ม.ค. 21
4050
3
เม.ย. 19
6718
Underline Odoo 17 Fields แก้ไขแล้ว
1
ก.ค. 24
1455
Inherit from inherited view แก้ไขแล้ว
5
มิ.ย. 20
6822
2
มิ.ย. 17
6358