Pre-alpha. No tagged release and no upgrade path between versions. Use for evaluation and development only, not production.
Core DevPre-alpha

SWC widget catalog

Built-in field widgets registered in core/swc/src/widgets/registry.ts. Reference a widget in view XML with widget="…" on . When omitted, SWC infers a widget from the ORM field type.

Registry keys

Widget keyComponentORM typesDefault when omitted
default, charDefaultFieldCharChar fields
emailDefaultField (type=email)Char
integer, float, numericDefaultFieldInteger, Float, Numericmatching type
text, jsonTextareaFieldTextText
dateDateFieldDateDate
datetimeDateTimeFieldDateTimeDateTime
booleanBooleanFieldBooleanBoolean
boolean_toggleBooleanToggleFieldBoolean
radioBooleanRadioFieldBoolean, Selection
phonePhoneFieldChar
selectionSelectionFieldSelection, Many2oneSelection
many2oneMany2OneFieldMany2oneMany2one
many2many, many2many_tagsMany2ManyTagsFieldMany2manyMany2many → tags
one2manyOne2ManyFieldOne2manyOne2many
statusbarStatusbarFieldSelection
priorityPriorityFieldSelection, Integer
imageImageFieldBinary, Char
monetaryMonetaryFieldFloat, Numeric
htmlHtmlFieldText
binaryBinaryFieldBinary
referenceReferenceFieldReference
colorColorFieldChar
urlUrlFieldChar
progress, progressbarProgressFieldFloat, Integer

Scalar widgets

default / char / email / integer / float

<field name="name"/>
<field name="email" widget="email"/>
<field name="amount" widget="float"/>

Renders a text or number input. Email uses type="email". Autocomplete tokens are inferred from field names (email, phone, name, …) in field-shell.ts.

text

<field name="note" widget="text"/>

Multiline textarea for Text fields.

date / datetime

<field name="date_start" widget="date"/>
<field name="scheduled_at" widget="datetime"/>

Native inline or datetime-local with Today/Clear actions.

Boolean widgets

boolean

<field name="active" widget="boolean"/>

Standard checkbox in the field shell.

boolean_toggle

<field name="active" widget="boolean_toggle"/>

Compact toggle with On/Off label. Works in list and form views.

radio

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

Radio group for selection or boolean fields.

Relational widgets

many2one

<field name="partner_id" widget="many2one"
       options="domain:[('customer','=',True)]"/>

Autocomplete search with RPC search_read. Domain supports $field_name$ placeholders.

many2many_tags

<field name="tag_ids" widget="many2many_tags"/>

Tag chips with add/remove. Default widget for Many2many when widget is omitted.

one2many

<field name="line_ids">
  <list editable="bottom">
    <field name="product_id"/>
    <field name="quantity"/>
  </list>
</field>

Embedded editable list. Opens dialog for create when configured.

Special widgets

statusbar

<header>
  <field name="state" widget="statusbar" options="clickable:1"/>
</header>

Workflow stage chips. Options:

OptionValuesEffect
clickable1Click stage to write field value
statescomma listLimit visible states
relationmodel nameRelated model for state labels

priority

<field name="priority" widget="priority" options="mode:stars,stars:5"/>

Star rating or select dropdown. Options: mode (stars / select), stars / max (count).

image

<field name="image" widget="image"/>

Image upload with crop support. Use options for circle avatar on kanban.

monetary

<field name="amount_total" widget="monetary" options="currency_symbol:$"/>

Formatted currency display.

html

<field name="description" widget="html"/>

Read-only HTML preview or editable textarea depending on readonly mode.

binary

<field name="attachment" widget="binary"/>

File upload field.

reference

<field name="ref" widget="reference"/>

Generic model+id reference (limited v1 UI).

color

<field name="color" widget="color"/>

Color picker input.

url

<field name="website" widget="url"/>

URL input with link affordance.

progress / progressbar

<field name="progress" widget="progressbar"/>

Progress bar for numeric completion fields.

Custom widgets

Register from an addon entry module:

registry.category("fields").add("my_widget", MyWidgetClass);
<field name="x" widget="my_widget"/>

See Build a module with SWC and SWC widgets.

See also