mail_composer_attachment_selector
The mail_composer_attachment_selector widget is the paperclip button in the email composer footer: a file picker that uploads straight to the message's thread and links the result into attachment_ids.
August 25, 2026Updated August 25, 20265 min read
| Technical name | mail_composer_attachment_selector |
|---|---|
| Field types | many2many |
| Views | form |
| Module | mail, installed with Discuss and any messaging app |
| Used in core | 2 occurrences in the mail module: the email composer wizard and the Scheduled Message form |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0 |
| No-code setup | No. This is an internal composer control with no Studio path. |
| Alternatives | many2many_binary, mail_composer_attachment_list, binary |
What the Composer attachment button does
What this means for your team
Working examples
Two hardcoded model checks and the 18.0 chatter leak
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. Model fallback and icon changes visible on the development branch; see below. |
| Odoo 19.0 | Verified | Verified against the shipped source, including the scheduled-message isolation fix. |
| Odoo 18.0 | Verified | First release with the widget. Carries the chatter-leak quirk on scheduled messages described below. |
| Odoo 17.0 | Not available | Widget does not exist; the composer's attachment button was internal. |
| Odoo 16.0 | Not available | Widget does not exist. |
Upgrade note. The widget appeared in Odoo 18; composers on 16 and 17 wired their attachment button differently, inside the composer component itself. Views that reference the widget name cannot be backported below 18 without also backporting the file.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| Clicking the paperclip does nothing in a custom wizard | The widget reads attachment_ids, model, and res_ids by literal name; your wizard likely names them differently. Name the many2many field attachment_ids and provide model plus res_ids or active_ids, or fork the component. |
| Attachment ends up on the wrong record | res_ids is empty so the widget fell back to context.active_ids, which held a different selection. Pass explicit res_ids into the composer context when launching it from code. |
| On Odoo 18, scheduled message attachments also appear in the chatter composer | Known 18.0 behavior: uploads pushed into the thread's observed composer object. Fixed in Odoo 19 with an isolated composer; on 18, remove the leftover manually or backport the fix. |
| Button missing from the composer footer | The core view hides it when can_edit_body is false, typically because the template locks the body. Check the template's edit permissions rather than the widget. |
| Options set in the view have no effect | The registration declares no options and no extractProps; everything in options is ignored. There is nothing to configure; behavior changes require extending the component. |
Composer attachment button vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
mail_composer_attachment_selector | Composer-style wizards where the file list lives elsewhere | Renders only an upload button and uploads to the target thread, not just the wizard |
| many2many_binary | General attachment fields users manage themselves | Shows the attached files as chips with delete and download |
| mail_composer_attachment_list | The full composer's attachment strip | Lists and removes attachments but deliberately has no upload button |
| binary | A single file on a record | One binary column instead of linked ir.attachment records |
Frequently asked questions
What is the mail_composer_attachment_selector widget?+
Can I configure mail_composer_attachment_selector with options?+
Can I use this widget on my own wizard?+
Does it support attaching multiple files at once?+
Why do scheduled message attachments show up in the chatter on Odoo 18?+
Is mail_composer_attachment_selector available before Odoo 18?+
What changes in Odoo 20?+
Building a custom wizard around the composer?
Hardcoded field names, thread resolution, and upload services make Odoo's composer easy to use and tricky to extend. We build and debug custom mail flows, composer extensions, and wizard UX for companies on Odoo 16 through 19.
Book a free consultation