mail.compose.message: fields, relations and API
The mail.compose.message model ("Email composition wizard") is a transient model declared by the Discuss module, then extended by 2 other modules. It exposes 54 fields, 43 of them declared directly on the model. Below you will find every field with its technical name, type, label and relations, followed by an Odoo 19 JSON-2 API call.
Model identity
- Technical name
mail.compose.message- Label
- Email composition wizard
- Type
- Transient (models.TransientModel)
- SQL table
mail_compose_message- Origin module
- Discuss (
mail) - Extended by
- mass_mailing, marketing_card
- Inherits from (mixins)
- mail.composer.mixin
Model fields
43 own fields, 5 inherited from mixins and 6 automatic ORM fields. Click a name to get a direct link to that field.
54 of 54 fields shown
| Technical name | Label | Type | Details |
|---|---|---|---|
| attachment_ids | Attachments | many2many | computed, stored |
| author_id | Author Author of the message. If not set, email_from may hold an email address that did not match any partner. | many2one | computed, stored |
| auto_delete | Delete Emails This option permanently removes any track of email after it's been sent, including from the Technical menu in the Settings, in order to preserve storage space of your Odoo database. | boolean | computed, stored |
| auto_delete_keep_log | Keep Message Copy Keep a copy of the email content if emails are removed (mass mailing only) | boolean | computed, stored |
| body | Contents | html | computed, stored |
| campaign_id | Mass Mailing Campaign | many2one | added by Email Marketing ( |
| composition_batch | Batch composition | boolean | computed |
| composition_comment_option | Comment Options | selection | Values: |
| composition_mode | Composition mode | selection | Values: |
| email_add_signature | Add signature | boolean | computed, stored |
| email_from | From Email address of the sender. This field is set when no matching partner is found and replaces the author_id field in the chatter. | char | computed, stored |
| email_layout_xmlid | Email Notification Layout | char | computed, stored |
| force_send | Send mailing or notifications directly | boolean | computed, stored |
| mail_activity_type_id | Mail Activity Type | many2one | |
| mail_server_id | Outgoing mail server | many2one | computed, stored |
| mailing_list_ids | Mailing List | many2many | added by Email Marketing ( |
| mass_mailing_id | Mass Mailing | many2one | added by Email Marketing ( |
| mass_mailing_name | Mass Mailing Name If set, a mass mailing will be created so that you can track its results in the Email Marketing app. | char | added by Email Marketing ( |
| message_type | Type Message type: email for email message, notification for system message, comment for other messages such as user replies | selection | required Values: |
| model | Related Document Model | char | computed, stored |
| model_is_thread | Thread-Enabled | boolean | computed |
| notified_bcc_contains_share | Is an external partner follower of the document? | boolean | computed |
| notify_author | Notify Author | boolean | computed, stored |
| notify_author_mention | Notify Author Mention | boolean | computed, stored |
| notify_skip_followers | Notify Skip Followers | boolean | computed, stored |
| parent_id | Parent Message | many2one | |
| partner_ids | Additional Contacts | many2many | computed, stored |
| partner_ids_all_have_email | Partner Ids All Have Email | boolean | computed |
| record_alias_domain_id | Alias Domain | many2one | computed, stored |
| record_company_id | Company | many2one | computed, stored |
| reply_to | Reply To Reply email address. Setting the reply_to bypasses the automatic thread creation. | char | computed, stored |
| reply_to_force_new | Considers answers as new thread Manage answers as new incoming emails instead of replies going to the same thread. | boolean | computed, stored |
| reply_to_mode | Replies Original Discussion: Answers go in the original document discussion thread. Another Email Address: Answers go to the email address mentioned in the tracking message-id instead of original document discussion thread. This has an impact on the generated message-id. | selection | computed Values: |
| res_domain | Active domain | text | |
| res_domain_user_id | Responsible Used as context used to evaluate composer domain | many2one | |
| res_ids | Related Document IDs | text | computed, stored |
| scheduled_date | Scheduled Date In comment mode: if set, postpone notifications sending. In mass mail mode: if sent, send emails after that date. This date is considered as being in UTC timezone. | char | computed, stored |
| subject | Subject | char | computed, stored |
| subtype_id | Subtype | many2one | computed, stored |
| subtype_is_log | Is a log | boolean | computed |
| template_id | Use template | many2one | |
| template_name | Template Name | char | |
| use_exclusion_list | Use Exclusion List Prevent sending messages to blacklisted contacts. Disable only when absolutely necessary. | boolean | |
| body_has_template_value | Body content is the same as the template | boolean | computed inherited from mail.composer.mixin |
| can_edit_body | Can Edit Body | boolean | computed inherited from mail.composer.mixin |
| is_mail_template_editor | Is Editor | boolean | computed inherited from mail.composer.mixin |
| lang | Lang | char | computed, stored inherited from mail.composer.mixin |
| render_model | Rendering Model | char | computed inherited from mail.render.mixin |
| create_date | Created on | datetime | read-onlyautomatic |
| create_uid | Created by | many2one | read-onlyautomatic |
| display_name | Display Name | char | read-onlycomputedautomatic |
| id | ID | integer | read-onlyautomatic |
| write_date | Last Updated on | datetime | read-onlyautomatic |
| write_uid | Last Updated by | many2one | read-onlyautomatic |
Relations
Models linked from this model
- ir.attachment: attachment_ids
- ir.mail_server: mail_server_id
- mail.activity.type: mail_activity_type_id
- mail.alias.domain: record_alias_domain_id
- mail.message: parent_id
- mail.message.subtype: subtype_id
- mail.template: template_id
- mailing.list: mailing_list_ids
- mailing.mailing: mass_mailing_id
- res.company: record_company_id
- res.partner: author_id, partner_ids
- res.users: res_domain_user_id
- utm.campaign: campaign_id
Fields of other models pointing here
No Many2one or Many2many field of another model points to this model.
Reading this model through the API
Odoo 19 JSON-2 API call reading the first five records with real fields of the model. Replace the instance, database and API key with your own.
curl -X POST "https://your-instance.odoo.com/json/2/mail.compose.message/search_read" \
-H "Authorization: bearer $ODOO_API_KEY" \
-H "X-Odoo-Database: your-db" \
-H "Content-Type: application/json" \
-d '{"domain":[],"fields":["message_type","author_id","campaign_id","mail_activity_type_id","mail_server_id"],"limit":5}'import requests
BASE_URL = "https://your-instance.odoo.com/json/2"
headers = {"Authorization": f"bearer {API_KEY}", "X-Odoo-Database": "your-db"}
res = requests.post(
f"{BASE_URL}/mail.compose.message/search_read",
headers=headers,
json={"domain": [], "fields": ["message_type","author_id","campaign_id","mail_activity_type_id","mail_server_id"], "limit": 5},
)
res.raise_for_status()
print(res.json())- External API access requires Odoo's Custom plan.
- XML-RPC and JSON-RPC will be removed in Odoo 22 (fall 2028): use JSON-2.
- The access rights and record rules of the key's user apply.
Cite this tool
Writing a tutorial, internal documentation or a forum answer? Copy this link to send your readers to the up-to-date reference.
<a href="https://aidoo.ai/en/outils/explorateur-modeles-odoo/mail-compose-message">mail.compose.message (Odoo 19.0)</a>Sources
Data verified on September 23, 2026 · Odoo 19.0 Community
Have an Odoo project, or want to put your ERP to work with AI? Let's talk
Implementation, custom module development, connecting Claude or ChatGPT to your data: tell us about your context and we will reply within 24 business hours.