Odoo 19.0 Community · Transient

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 nameLabelTypeDetails
attachment_idsAttachmentsmany2many
computed, stored
author_idAuthor

Author of the message. If not set, email_from may hold an email address that did not match any partner.

many2one
computed, stored
auto_deleteDelete 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_logKeep Message Copy

Keep a copy of the email content if emails are removed (mass mailing only)

boolean
computed, stored
bodyContentshtml
computed, stored
campaign_idMass Mailing Campaignmany2one

added by Email Marketing (mass_mailing)

composition_batchBatch compositionboolean
computed
composition_comment_optionComment Optionsselection

Values: reply_all (Reply-All), forward (Forward)

composition_modeComposition modeselection

Values: comment (Post on a document), mass_mail (Email Mass Mailing)

email_add_signatureAdd signatureboolean
computed, stored
email_fromFrom

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_xmlidEmail Notification Layoutchar
computed, stored
force_sendSend mailing or notifications directlyboolean
computed, stored
mail_activity_type_idMail Activity Typemany2one
mail_server_idOutgoing mail servermany2one
computed, stored
mailing_list_idsMailing Listmany2many

added by Email Marketing (mass_mailing)

mass_mailing_idMass Mailingmany2one

added by Email Marketing (mass_mailing)

mass_mailing_nameMass 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 (mass_mailing)

message_typeType

Message type: email for email message, notification for system message, comment for other messages such as user replies

selection
required

Values: auto_comment (Automated Targeted Notification), comment (Comment), notification (System notification)

modelRelated Document Modelchar
computed, stored
model_is_threadThread-Enabledboolean
computed
notified_bcc_contains_shareIs an external partner follower of the document?boolean
computed
notify_authorNotify Authorboolean
computed, stored
notify_author_mentionNotify Author Mentionboolean
computed, stored
notify_skip_followersNotify Skip Followersboolean
computed, stored
parent_idParent Messagemany2one
partner_idsAdditional Contactsmany2many
computed, stored
partner_ids_all_have_emailPartner Ids All Have Emailboolean
computed
record_alias_domain_idAlias Domainmany2one
computed, stored
record_company_idCompanymany2one
computed, stored
reply_toReply To

Reply email address. Setting the reply_to bypasses the automatic thread creation.

char
computed, stored
reply_to_force_newConsiders answers as new thread

Manage answers as new incoming emails instead of replies going to the same thread.

boolean
computed, stored
reply_to_modeReplies

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: update (Store email and replies in the chatter of each record), new (Collect replies on a specific email address)

res_domainActive domaintext
res_domain_user_idResponsible

Used as context used to evaluate composer domain

many2one
res_idsRelated Document IDstext
computed, stored
scheduled_dateScheduled 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
subjectSubjectchar
computed, stored
subtype_idSubtypemany2one
computed, stored
subtype_is_logIs a logboolean
computed
template_idUse templatemany2one
template_nameTemplate Namechar
use_exclusion_listUse Exclusion List

Prevent sending messages to blacklisted contacts. Disable only when absolutely necessary.

boolean
body_has_template_valueBody content is the same as the templateboolean
computed

inherited from mail.composer.mixin

can_edit_bodyCan Edit Bodyboolean
computed

inherited from mail.composer.mixin

is_mail_template_editorIs Editorboolean
computed

inherited from mail.composer.mixin

langLangchar
computed, stored

inherited from mail.composer.mixin

render_modelRendering Modelchar
computed

inherited from mail.render.mixin

create_dateCreated ondatetime
read-onlyautomatic
create_uidCreated bymany2one
read-onlyautomatic
display_nameDisplay Namechar
read-onlycomputedautomatic
idIDinteger
read-onlyautomatic
write_dateLast Updated ondatetime
read-onlyautomatic
write_uidLast Updated bymany2one
read-onlyautomatic

Relations

Models linked from this model

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
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}'
Python (requests)
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.