Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
3503 Vistas

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.



Avatar
Descartar
Mejor respuesta

 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

Avatar
Descartar
Mejor respuesta

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

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
ago 23
2864
1
may 23
2636
3
abr 23
4638
1
ene 23
2652
2
ago 24
4172