Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
3608 Lượt xem

Hello, how can I put 3 fields in a form, that are on a single line and that each field has the corresponding label?

For example, the first field has a width of 50% and the other two fields have a width of 25%, but that these widths also have their labels, that the labels align with their fields.

Thank you very much for your support.



Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

 HI  Learning_Odoo

  • You want to put 3 Fields with their respective labels on single line ,odoo 16 then use below code :

         Put 3 fields in .py file

​field1=fields.Char(string='field1')

         field2=fields.Char(string='field12')

        field3=fields.Char(string='field13')


          .xml file

 

 I hope this is helpful to you.


 Thanks & Regards,

 Email: odoo@devintellecs.com

 Skype: devintelle

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

You can make use of bootstrap classes to set up the form. Give the code as shown below.


<div class="row">
    <div class="col-6">
      <label>

      </label>

      <input>

</input>

    </div>

    <div class="col-3">

<label>

      </label>

      <input>

      </input>

</div>

    <div class="col-3">

<label>

      </label>

      <input>

      </input>

</div>

  </div>



Hope it helps

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 8 23
3004
1
thg 5 23
2742
3
thg 4 23
4845
1
thg 1 23
2797
2
thg 8 24
4322