Field Widgets in Odoo 17

October 23, 2025 by
Field Widgets in Odoo 17
Liu

Widget are feature that changes or adds functionality to fields in odoo. These changes affect how the field is shown in the system and sometimes changes how the user interact with the field it self.


Here we'll discuss some of the widgets that is provided by Odoo to use.

1. Badge

Badge widget show the selection field as a badge.

<field name="state" widget="badge" decoration-success="state == 'posted'" decoration-info="state == 'draft'"/>

The badges shows changes depending on the "decoration-" variable, available decoration options are:

  • decoration-danger
  • decoration-info
  • decoration-secondary
  • decoration-success
  • decoration-warning

2. Selection Badge

Change how selection field as multiple clickable button instead of a list.

<field name="state" widget="selection_badge"/>

3. Percent Pie

Change how integer and float field is shown to a percentage in a pie chart, this also make the field with this widget uneditable. 

<field name="progress_float" widget="percentpie"/>

4. Radio

Show selection field options in form as radio button.

<field name="state" widget="radio"/>

5. Image

Change the field focus to image, shows the image that is uploaded to the field. Applicable to char and binary fields

<field name="field_char" string="Image" widget="image"/>

6. Ace

Change the char or text field to be a code editor.

<field name="field_char" string="ace" widget="ace"/>

7. Priority

Show selection field as stars, representing options as star priority level.

<field name="state" widget="priority"/>

8. Remaining Days

Show a date field as a text of how many days to assigned date in the field in the list view.

<field name="field_date" widget="remaining_days"/>


9. PDF Viewer

Change a binary field to specialize for PDF file and show a pdf preview for upload field.

<field name="field_binary" widget="pdf_viewer"/>


If you need any help about odoo, please chat with us.

Field Widgets in Odoo 17
Liu October 23, 2025
Share this post
Archive