Search code examples
pythonxmlodoo

How to set margin to fields in odoo form view?


I have a form view with some fields, but each element seem to be so close to the field above. Is it possible to set some margin button? This is my code:

<page name="personal_information" string="Información Personal">
  <group>
    <group>
      <field name="numero_cuenta"/>
      <field name="sabe_leer"/>
      <field name="sabe_escribir"/>
      <field name="nivel_educativo"/>
      <field name="country_of_birth" string="Nacionalidad"/>
    </group>
    <group>
      <field name="adjunto_contrato" widget="download_link" filename="adjunto_contrato_filename" options="{'filename': 'adjunto_contrato_filename'}"/>
      <field name="adjunto_contrato_filename" readonly="1" invisible="1" force_save="1"/>
      <field name="adjunto_copia_cedula" widget="download_link" filename="adjunto_copia_cedula_filename" options="{'filename': 'adjunto_copia_cedula_filename'}"/>
      <field name="adjunto_copia_cedula_filename" readonly="1" invisible="1" force_save="1"/>
      <field name="adjunto_acta" widget="download_link" filename="adjunto_acta_filename" options="{'filename': 'adjunto_acta_filename'}"/>
      <field name="adjunto_acta_filename" readonly="1" invisible="1" force_save="1"/>
    </group>
  </group>
  <group>

This picture shows how the fields in each column are so close


Solution

  • Try using the style property

    Example:

    <field name="numero_cuenta" style="margin-bottom:10px;"/>
    

    For reference: please check the here.