Skip to main content
iVentureTeam

base_automation_actions_one2many

A rule's actions shown as one horizontal strip that measures itself against the available width and hides what does not fit behind an and 3 more counter.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 27, 2026Updated September 8, 20266 min read
Technical namebase_automation_actions_one2many
Field typesone2many
Viewsform
Modulebase_automation, the Automation Rules app
Used in core1 occurrence, the actions column on the automation rule form in base_automation
VersionsOdoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0
No-code setupNo. It is part of the automation rules interface itself
Alternativesone2many, x2many_buttons, many2many_tags, base_automation_trigger_selection

What the automation actions strip does

An automation rule can perform several actions: update a field, send an email, add followers, create an activity. Showing them as an embedded list would take a block of vertical space for what is usually two or three short labels, on a screen where the trigger and its conditions matter more.

This widget lays them out horizontally instead, as a compact strip of action labels on one line. The problem with one line is that it has a width, and a rule with six actions will not fit. So the widget measures.

After rendering, it reads the real width of the container and of every action in it, works out where the overflow starts, hides everything from that point on, and shows a counter saying how many are hidden. Resize the window and it does the whole thing again.

What this means for your team

This is a density decision rather than a feature. Automation rules are scanned more often than they are edited, and what a reader wants from the actions column is a rough sense of what the rule does, not the full definition. A strip that says Update Stage, Send Email and 2 more answers that in a glance and takes one line.

The general lesson for custom interfaces is that overflow is a layout problem best solved by measuring, not by guessing a character count. Truncating at a fixed number of items breaks on a wide screen and on a narrow one in opposite directions; measuring adapts to both, and to translations, which are the usual reason a guessed limit stops working.

Supported options in Odoo 19

The widget declares no options and no supported types. Its registration provides a component and two injected related fields, which is everything it needs from each action record. Read from base_automation_actions_one2many_field.js, Odoo 19.0.

OptionTypeWhat it does
namerelated field on the actionInjected by the registration. Used as each action's label in the strip. From Odoo 19 this is what the user sees, rather than a label derived from the action type.
staterelated field on the actionInjected by the registration. The action's type, used by the template.

The measurement is not configurable. The width reserved for the counter is a fixed number in the source, and there is no option to change how many actions are shown or to disable the collapsing. The two related fields it injects are likewise fixed.

Working examples

The core usage

<field name="action_server_ids"
       widget="base_automation_actions_one2many"
       class="align-self-center w-100 me-md-3"/>

The full width class matters: the widget measures its container, so a container without a defined width gives it nothing to work against.

The fields it injects

# added to every action record automatically
name     # shown as the label
state    # the action type

Both are declared as related fields on the registration, so the view does not have to load them.

The plain list instead

<field name="action_server_ids">
  <list> <field name="name"/> </list>
</field>

Vertical, complete, and taller. The right choice on a form where the actions are the main subject.

Measuring properly, twice over

The measuring routine is the whole widget, and it is careful in two ways worth copying.

First, it removes any hiding classes before measuring. An element that is already hidden has no width, so measuring without resetting would compound the previous pass and progressively hide everything. Clearing first means each pass starts from the true widths.

Second, it uses the unrounded bounding rectangle rather than the integer offset width, with a comment saying so. Summing rounded widths across half a dozen elements accumulates enough error to hide one item too many or too few, and on a strip of short labels that is visible.

The overflow point is found by walking the actions and accumulating width, starting from a reserved allowance for the counter. The first element that would push the total past the container width becomes the overflow point, and it and everything after it are hidden. The hidden count is then derived from that element's position in the list.

A re-render is triggered only when the hidden count actually changes, which keeps the resize handler from causing a render on every animation frame. The resize listener itself is throttled to animation frames for the same reason.

The Odoo 18 version carried a map from each action type to a human label, so the strip read Send email rather than the action's own name. Odoo 19 removed that map and shows the action's name field instead, which means a badly named action now shows its bad name rather than a generic type label.

Version compatibility

VersionStatusNotes
Odoo 20.0In developmentNot released. Same behavior on the development branch; rendering and listener helpers change.
Odoo 19.0VerifiedVerified against the shipped source. Each action is labelled with its own name.
Odoo 18.0VerifiedSame layout and measuring, but actions were labelled from a fixed action type map.
Odoo 17.0VerifiedFirst version.
Odoo 16.0Not availableWidget does not exist.

Upgrade note. No view change is needed. The visible difference between Odoo 18 and Odoo 19 is what each action is labelled with: Odoo 18 printed a friendly label derived from the action type, Odoo 19 prints the action's own name. Rules whose actions were left with default names will read less clearly after an upgrade, which is worth a quick pass over existing rules.

What is changing in Odoo 20

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026. The development branch is unstable and this may still change; we re-verify the page after release.

Same behavior, new helpers. The measurement, the reserved counter width, the throttled resize handling and the render-only-on-change rule are all identical. The component moves to the new rendering, listener and reference helpers, which affects code that patches it rather than views.

Common problems and fixes

SymptomCause and fix
Everything is hidden behind the counterThe container has no usable width, so nothing fits. Give the field a full width class, as the core view does.
The strip does not adapt when I resizeThe resize handler is throttled and only re-renders when the hidden count changes. Expected. A resize that does not change what fits produces no visible change.
Actions show unhelpful namesFrom Odoo 19 the label is the action's own name field, not a label derived from its type. Rename the actions on the rule; the names are now what readers see.
One action too many is hiddenSpace is reserved for the counter before deciding what fits. Expected. The reservation is a fixed value in the source with no option.
Options are ignoredThe registration provides only a component and two related fields, with no extractor. Nothing to configure here.
Missing widget errorThe base automation module is not installed in that database. Install Automation Rules, or use a plain one2many.

Automation actions strip vs the alternatives

WidgetBest forKey difference
base_automation_actions_one2manyShowing a relation as a one line summary that adapts to the available widthMeasures real element widths after rendering and collapses the overflow into a counter
one2manyEditing the related recordsA full vertical list, with no measuring and no collapsing
x2many_buttonsA compact relation rendered as buttonsFixed layout with no overflow handling
many2many_tagsA relation shown as tagsWraps onto more lines instead of collapsing
base_automation_trigger_selectionThe rule's triggerThe other half of the same form, a grouped selection rather than a relation

Use a plain embedded list wherever the actions are the subject of the screen rather than a summary of it. This widget is worth its complexity only where the relation has to share a line with something else. If you need the same effect elsewhere, the measuring routine is the reusable part, not the widget.

Frequently asked questions

How does the widget decide what to hide?+
It measures the container and every action after rendering, reserves a fixed width for the counter, then walks the actions accumulating width. The first one that would overflow, and everything after it, is hidden.
Why does it measure instead of truncating at a fixed count?+
Because widths vary with the label text, the screen and the translation. A fixed count breaks on wide screens and on narrow ones in opposite directions; measuring adapts to both.
Why do my actions have unhelpful labels?+
From Odoo 19 each action is labelled with its own name field. Odoo 18 derived a friendly label from the action type, so rules with default names read worse after an upgrade.
Does it support any options?+
None. The registration provides a component and two injected related fields, and there is no extractor, so anything in the options dictionary is ignored.
Can I use it on another relation?+
Technically yes, as long as the related records have a name and a state field, since both are injected by the registration. It is written for automation actions, though.

Automations you can read at a glance

A rule nobody can summarize is a rule nobody dares change. We build and document Odoo automations, and the reporting around them, so the logic stays visible on versions 16 through 19.

Book a free consultation

How this page was produced

The measurement routine, the reserved counter width, the class clearing before measuring, the unrounded width comment, the throttled resize listener and the render-only-on-change rule were read from base_automation_actions_one2many_field.js on the Odoo 19.0 branch, with the usage taken from base_automation/views/base_automation_views.xml. The removed action type label map was established by comparing the file on the 18.0 branch, and the Odoo 20 notes come from the public development branch. Spotted an error? Tell us and we will correct the page.