class

The HTML class to set on the generated element.

The styling uses the Bootstrap framework and UI icons. Common Odoo classes include:

  • oe_inline: prevents the usual line break following fields, and limits their span;

  • oe_left, oe_right: floats the element to the corresponding direction;

  • oe_read_only, oe_edit_only: only displays the element in the corresponding form mode;

  • oe_avatar: for image fields, displays images as an “avatar” (max 90x90 square);

  • oe_stat_button: defines a particular rendering to dynamically display information while being clickable to target an action.

Example

<field name="fname" class="oe_inline oe_left oe_avatar"/>

Example

<button type="object" name="ACTION" class="oe_stat_button" icon="FONT_AWESOME" help="HELP">
   <div class="o_field_widget o_stat_info">
      <span class="o_stat_value"><FIELD/></span>
      <span class="o_stat_text">TEXT</span>
   </div>
</button>
Requirement

Optional

Type

str

Default

''