Skip to main content
iVentureTeam

base_automation_trigger_selection

The trigger dropdown on an automation rule, grouped into six headings and filtered against the model you picked. Choose a model with no stage field and the stage triggers are simply not offered.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 27, 2026Updated September 8, 20267 min read
Technical namebase_automation_trigger_selection
Field typesselection
Viewsform
Modulebase_automation, the Automation Rules app
Used in core1 occurrence, the trigger field on the automation rule form in base_automation
VersionsOdoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0
No-code setupNo. The widget is part of the automation rules interface itself
Alternativesselection, dynamic_selection, filterable_selection, base_automation_actions_one2many

What the automation trigger picker does

An automation rule fires on a trigger, and Odoo has around fifteen of them. Presented as a flat dropdown they are a wall of similar sounding phrases, and most of them do not apply to whatever model you just chose: there is no point offering to fire when the stage changes on a model with no stages.

This widget solves both problems. It groups the triggers under six headings in a deliberate order, from the everyday value changes at the top to the deprecated ones at the bottom. And it filters each group against the fields the chosen model actually has, dropping any trigger with nothing to watch.

The filtering is live. When you change the model on the rule, the widget fetches that model's fields from the server and recomputes the whole grouped list, so the dropdown always reflects the model in front of you.

What this means for your team

Automation rules are the feature most likely to be configured by a business user rather than a developer, and the most likely to be configured wrongly. Every trigger removed from the list is a rule that cannot be created broken. That is worth more than documentation, because nobody reads documentation at the moment they are building a rule.

The deprecated group is the part worth understanding as a policy. Odoo does not delete old triggers, because existing rules use them, but it does not offer them either: the group only appears if the rule you are editing already uses one. So an old rule remains editable and visible, while a new rule cannot accidentally adopt a trigger that is on its way out.

The email group is the clearest example of model-aware filtering. Triggers based on messages only make sense on models with a chatter, and the widget knows that from a dependency the rule model exposes rather than from guesswork.

Supported options in Odoo 19

The widget declares no options of its own and inherits the selection widget's. What it adds is one declared field dependency and a server fetch, described below. Read from base_automation_trigger_selection_field.js, Odoo 19.0.

OptionTypeWhat it does
model_is_mail_threadfield dependencyDeclared as a dependency, so it is always loaded. When false, the entire email events group is excluded from the dropdown.(since Odoo 19.0)
placeholder_fieldfieldInherited from the selection widget. Shows another field's value as a hint when this one is empty.

The grouping is fixed in the source. The six groups, their order, their labels and which triggers belong to which are all written into the file. There is no option to add a group, reorder them or move a trigger, so extending the trigger set from a custom module means patching the widget as well as the model.

Working examples

The core usage

<field name="trigger"
       widget="base_automation_trigger_selection"/>

No options. The widget reads the rule's target model itself and fetches that model's fields.

The companion field it depends on

# declared as a field dependency, so it is always loaded
model_is_mail_thread
# false hides the whole email events group

This one is declared properly rather than read by literal name, so it is loaded even when the view does not show it.

The six groups, in order

Values Updated      # stage, user, tag, state, priority, archive
Email Events        # message sent, message received
Timing Conditions   # on time, after creation, after update
Custom              # create, create or write, delete, on change
External            # webhook
Deprecated          # on write, hidden unless already in use

The order is fixed by a sequence number on each group, not by declaration order.

Two filters, one fetch, and a race the next version fixes

The filtering happens in two passes. First, each trigger value is looked up in the group table to find its heading. Triggers in the deprecated group are skipped unless the rule's current value is itself a deprecated one, and whole groups can be excluded by key, which is how the email group disappears on models without a chatter.

Second, each surviving trigger is checked against a per-trigger filter function. Those functions describe what kind of field the trigger needs, and the widget applies them to the target model's real field list. If nothing matches, the trigger is dropped. That is why the stage trigger vanishes on a model with no stage field, without anyone having to maintain a list of which models support which triggers.

The field list comes from a search on the field definition model, run inside a record observer. The observer remembers the last model it fetched for and only refetches when the model actually changes, which keeps typing elsewhere on the form from generating requests.

Odoo 19 made three changes here worth naming. The email events group is new, along with its dependency on whether the model is a message thread. The plain create trigger was added to the custom group. And the group objects renamed their label key, which matters to anyone patching the table.

The development branch adds something the current version lacks: a guard against a slow fetch. It stores the request rather than its result and stamps each observer run with an identifier, so a fetch for a model you have already moved away from cannot overwrite the list for the model you are now on. That is a real race in the current code, visible only if you change the model twice quickly on a slow connection.

Version compatibility

VersionStatusNotes
Odoo 20.0Partial / changedNot released. Adds a race guard to the field fetch; grouping and filtering unchanged.
Odoo 19.0VerifiedVerified against the shipped source. Adds the email events group, the create trigger and a renamed group label key.
Odoo 18.0VerifiedFive groups, no email events, and no create trigger in the custom group.
Odoo 17.0VerifiedFirst version, with the same grouping approach.
Odoo 16.0Not availableWidget does not exist.

Upgrade note. No view change is needed. Odoo 19 added the email events group, added the create trigger to the custom group, and renamed the label key on the group objects. A custom module that patched the group table on Odoo 18 has to be updated for that rename, and should also check whether its triggers now belong in the new group.

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.

A race guard. The field fetch is restructured so that each run of the observer is stamped and the pending request is stored rather than awaited into a shared variable. The effect is that switching the rule's model twice in quick succession can no longer leave the dropdown showing triggers filtered for the wrong model.

Everything else is the props and state migration. The six groups, their order, the per-trigger filters and the email group's dependency are unchanged.

Common problems and fixes

SymptomCause and fix
A trigger I expected is missingThe target model has no field the trigger could watch, so it was filtered out. Check the model has the relevant field, for example a stage or a priority.
No email triggers offeredThe target model is not a message thread, which excludes the whole email group. Expected. Email triggers need a model with a chatter.
The deprecated group is not shownIntended. It only appears when the rule already uses a deprecated trigger. Nothing to fix; existing rules keep working and stay editable.
The list is filtered for the wrong modelThe model was changed twice quickly and a slow field fetch resolved out of order. Reload the form. The development branch fixes this with a request guard.
A custom trigger appears ungrouped or errorsThe group table is fixed in the source and does not know the new value. Patch the widget's group table alongside adding the trigger to the model.
The dropdown is slow to open after changing the modelThe field list is fetched from the server on each model change. Expected once per model; the result is reused until the model changes again.

Automation trigger picker vs the alternatives

WidgetBest forKey difference
base_automation_trigger_selectionChoosing an automation trigger without meeting options the model cannot supportGroups triggers under six fixed headings and filters them against the target model's real fields
selectionAny ordinary selection fieldA flat list with no grouping and no model-aware filtering
dynamic_selectionSelections whose values come from the serverServer-sourced values rather than client-side filtering of declared ones
filterable_selectionLong lists that need narrowing by the userInteractive filtering rather than automatic exclusion
base_automation_actions_one2manyThe actions the rule performsThe other half of the same form, showing actions rather than the trigger

There is no alternative to choose here: the widget is part of the automation rules interface and depends on that model's fields. What is worth taking from it is the pattern, which is a selection whose options are computed from another record's schema. If you build something similar, note that Odoo puts the filter logic in a shared utilities file rather than in the widget, which makes it testable.

Frequently asked questions

Why are some triggers missing from the dropdown?+
Because the target model has no field they could watch. Each trigger carries a filter describing what it needs, and the widget applies those filters to the model's real field list.
Where did the email triggers go?+
They are hidden on models that are not message threads. The widget declares a dependency on that flag, so it always knows, and excludes the whole email group when it is false.
What is the deprecated group?+
Triggers Odoo no longer recommends. The group is hidden unless the rule you are editing already uses one, so old rules stay editable while new ones cannot adopt them.
Can I add my own trigger group?+
Not through options. The six groups, their order and their contents are written into the widget's source, so a custom trigger needs the widget patched as well as the model.
What changed in Odoo 19?+
Three things: the email events group was added, the plain create trigger joined the custom group, and the group objects renamed their label key, which matters if you patched the table.

Automation rules that survive the person who wrote them

Automated actions are the fastest way to encode a process and the fastest way to create one nobody understands. We design, document and test Odoo automation so it stays maintainable, on versions 16 through 19.

Book a free consultation

How this page was produced

The six groups and their order, the deprecated-group rule, the per-trigger field filters, the declared dependency on whether the model is a message thread and the cached field fetch were read from base_automation_trigger_selection_field.js on the Odoo 19.0 branch, with the usage taken from base_automation/views/base_automation_views.xml. The Odoo 19 additions were established by comparing the file on the 17.0 and 18.0 branches, and the race guard from the public development branch. Spotted an error? Tell us and we will correct the page.