Skip to main content
iVentureTeam

mail_composer_template_selector

The small three dot Templates button in Odoo's email composer footer is the mail_composer_template_selector widget. It loads your templates first, shared ones second, and quietly hides its management entries when a context key says so.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 24, 2026Updated August 24, 20264 min read
Technical namemail_composer_template_selector
Field typesmany2one (mail.template; the descriptor declares no supportedTypes)
Viewsform (email composer and send wizards, rendered in the footer)
Modulemail
Used in core3 occurrences across 3 modules: the account move send wizard, the mail composer and the recruitment interviewer wizard
VersionsOdoo 20.0, Odoo 19.0, Odoo 18.0
No-code setupNo. Applied via the widget attribute in view XML
Alternativesmany2one, selection, html_mail

What the Template selector does

The mail_composer_template_selector widget is the compact template picker that lives in the footer of Odoo's email composer and of send wizards such as the invoice send dialog. It is bound to the wizard's template_id many2one, but it does not render a normal many2one input: it renders a button with a vertical ellipsis icon (keyboard shortcut t) that opens a dropdown of matching mail.template records.

Matching means: templates whose model equals the composer's render_model. The fetch runs in two passes, first the current user's own templates, then shared templates with no owner, until a combined cap of 80. Selecting an entry writes it to template_id, which triggers the composer's server side onchange that swaps subject, body and attachments.

What this means for your team

For teams that live in the composer, sales follow ups, invoice cover emails, recruitment replies, the two pass ordering is the quiet productivity feature: the templates you personally saved always sort above the company wide ones, so the one you use daily is one click away.

The management entries matter for governance. Save as Template snapshots the current composer content into a new template through a wizard, and Manage Templates jumps to the full template list filtered to yours. When a flow should not let users mint new templates, say a legally reviewed dunning email, the wizard can pass one context key and both entries vanish, leaving a pick only dropdown.

Working examples

<!-- Core usage in the invoice send wizard footer (account module) -->
<field name="template_id" widget="mail_composer_template_selector"/>

<!-- Pick only variant: hide Save as Template and Manage Templates -->
<field name="template_id" widget="mail_composer_template_selector"
       context="{'hide_mail_template_management_options': True}"/>

Visibility, saving and the Search More path

Three behaviors are read straight from the source. First, visibility: the entire dropdown is wrapped in a check on the record's can_edit_body field, so composers that forbid body editing show no template button at all; that is a field dependency, meaning the widget forces the field into the data fetch even if the view does not contain it.

Second, Save as Template does not silently create anything: it saves the composer record first and then launches the open_template_creation_wizard action on it, so an invalid composer form blocks the save path before any template exists.

Third, Search More opens a SelectCreateDialog with noCreate and single selection, filtered to the render model, and only appears when the fetch hit the 80 cap. Odoo 18 behaved differently on every point that matters: the cap was 7, there was no Search More, and each template row carried delete and overwrite icons guarded by confirmation dialogs, a management surface Odoo 19 removed entirely in favor of the templates list view.

Version compatibility

VersionStatusNotes
Odoo 20.0In developmentNot released. Props system migration only on the development branch so far; see below.
Odoo 19.0VerifiedVerified against the shipped source. 80 template cap, Search More dialog, management entries removable via context.
Odoo 18.0Partial / changedIntroduced here. Cap of 7 templates, in dropdown delete and overwrite icons, no Search More.
Odoo 17.0Not availableDoes not exist. The composer used a plain many2one template field.
Odoo 16.0Not availableDoes not exist.
Introduced in Odoo 18. Flows migrated to 19 lose the in dropdown delete and overwrite icons; template maintenance moves to Manage Templates.

What is changing in Odoo 20

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026. The changes below are read from the public development branch and are not final until release.

No functional changes so far: the file is being migrated to the new props system and the templates list now initializes empty instead of undefined, a hardening detail. The two pass fetch, the 80 cap, both field dependencies and the context key all survive unchanged. We re-verify after the release.

Common problems and fixes

SymptomCause and fix
The template button does not appear in the composerThe composer record's can_edit_body is false; the whole dropdown is conditioned on it. Check why the composition mode forbids body editing; the widget cannot be forced visible without it.
A template exists but is missing from the dropdownIts model does not match the composer's render_model, or it sits beyond the 80 result cap. Fix the template's Applies to model, or use the Search More entry which searches the full table.
Save as Template and Manage Templates are missingThe action or field passed hide_mail_template_management_options in the context. Remove the context key if users should manage templates from this flow.
Save as Template does nothingThe composer record failed to save; the widget saves the record before opening the template creation wizard. Fill the required composer fields first; the save failure blocks the wizard silently.

Template selector vs the alternatives

WidgetBest forKey difference
mail_composer_template_selectorPicking and saving mail templates inside the composer footerTwo pass own first fetch, save then wizard flow, context removable management entries
many2oneA plain template field on custom wizardsStandard autocomplete with quick create, no composer integration
selectionA small fixed choice of templatesStatic selection, no search dialog and no template management
html_mailThe email body the chosen template fillsEdits the rendered content rather than picking the source template

This widget is purpose built for the composer. For template like picking outside the composer, the general widgets below are the right tools.

Frequently asked questions

How does Odoo decide which templates the composer dropdown shows?+
Templates whose model matches the composer's render_model, fetched in two passes: the current user's own templates first, then shared templates without an owner, up to 80 combined. Beyond that, use Search More.
How do I hide Save as Template from users?+
Pass {'hide_mail_template_management_options': True} in the context of the field or the action opening the wizard. Both Save as Template and Manage Templates disappear; the pick list stays.
Where did the delete template button in the dropdown go?+
Odoo 18 offered delete and overwrite icons per row inside the dropdown. Odoo 19 removed them; template maintenance now happens in the templates list opened by Manage Templates.
Does the widget render the mail.template body?+
No. It only writes template_id on the composer record. The server side onchange then loads subject, body and attachments into the composer fields.

Email flows that should be one click, but are not?

Send wizards, locked down template governance and per model template libraries are all wiring around this little widget. We build custom composer flows, enforce template policies with context keys and access rights, and clean up template chaos across departments.

Streamline your Odoo emails

How this page was produced

Behavior was read from mail_composer_template_selector.js and its XML template in the Odoo 19.0 mail module: the two pass ORM fetch with its 80 limit, the can_edit_body wrapper, the save then wizard flow, and the Search More dialog flags. The 18.0 file was diffed to document the removed delete and overwrite management. The Odoo 20 section is a diff against the public development branch. Corrections via our contact page are welcome.