Odoo 19.0 Community · Persistent

mail.message: fields, relations and API

The mail.message model ("Message") is a persistent model declared by the Discuss module, then extended by 9 other modules. It exposes 64 fields, 58 of them declared directly on the model; 19 fields from other models point to it. 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.message
Label
Message
Type
Persistent (models.Model)
SQL table
mail_message
Origin module
Discuss (mail)
Extended by
portal, account, sms, rating, im_livechat, portal_rating, website_slides, project, snailmail
Default order (_order)
id desc
Display field (_rec_name)
subject
Inherits from (mixins)
bus.listener.mixin

Model fields

58 own fields, 0 inherited from mixins and 6 automatic ORM fields. Click a name to get a direct link to that field.

64 of 64 fields shown

Technical nameLabelTypeDetails
account_audit_log_account_idAccountmany2one
computed

added by Invoicing (account)

account_audit_log_company_idCompany many2one
computed

added by Invoicing (account)

account_audit_log_move_idJournal Entrymany2one
computed

added by Invoicing (account)

account_audit_log_partner_idPartnermany2one
computed

added by Invoicing (account)

account_audit_log_previewDescriptiontext
computed

added by Invoicing (account)

account_audit_log_restrictedProtected by restricted Audit Logsboolean
computed

added by Invoicing (account)

account_audit_log_tax_idTaxmany2one
computed

added by Invoicing (account)

attachment_idsAttachmentsmany2many
author_avatarAuthor's avatarbinary

related: author_id.avatar_128

author_guest_idGuestmany2one
author_idAuthor

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

many2one
bodyContentshtml
call_history_idsCall Historyone2many

inverse: start_call_message_id

channel_idChannelmany2one
computed
child_idsChild Messagesone2many

inverse: parent_id

dateDatedatetime
email_add_signatureEmail Add Signatureboolean
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
email_layout_xmlidLayoutchar
has_errorHas errorboolean
computed
has_sms_errorHas SMS errorboolean
computed

added by SMS gateway (sms)

incoming_email_ccEmails Ccchar
incoming_email_toEmails Totext
is_current_user_or_guest_authorIs Current User Or Guest Authorboolean
computed
is_internalEmployee Only

Hide to public / portal users, independently from subtype configuration.

boolean
letter_idsLetterone2many

inverse: message_id

added by Snail Mail (snailmail)

linked_message_idsLinked Messagemany2many
computed
mail_activity_type_idMail Activity Typemany2one
mail_idsMailsone2many

inverse: mail_message_id

mail_server_idOutgoing mail servermany2one
message_idMessage-Id

Message unique identifier

char
read-only
message_typeType

Used to categorize message generator 'email': generated by an incoming email e.g. mailgateway 'comment': generated by user input e.g. through discuss or composer 'email_outgoing': generated by a mailing 'notification': generated by system e.g. tracking messages 'auto_comment': generated by automated notification mechanism e.g. acknowledgment 'user_notification': generated for a specific recipient

selection
required

Values: email (Incoming Email), comment (Comment), email_outgoing (Outgoing Email), notification (System notification), auto_comment (Automated Targeted Notification), out_of_office (Out-of-office Message), user_notification (User Specific Notification)

modelRelated Document Modelchar
needactionNeed Actionboolean
computed
notification_idsNotificationsone2many

inverse: mail_message_id

notified_partner_idsPartners with Need Actionmany2many
outgoing_email_toemails Tochar
parent_idParent Messagemany2one
partner_idsRecipientsmany2many
pinned_atPinned

Datetime at which the message has been pinned

datetime
previewPreview

The text-only beginning of the body used as email preview.

char
computed
rating_idRatingmany2one
computed

added by Customer Rating (rating)

rating_idsRelated ratingsone2many

inverse: message_id

added by Customer Rating (rating)

rating_valueRating Valuefloat
computed

added by Customer Rating (rating)

reaction_idsReactionsone2many

inverse: message_id

record_alias_domain_idAlias Domainmany2one
record_company_idCompanymany2one
record_nameMessage Record Namechar
computed
reply_toReply-To

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

char
reply_to_force_newNo threading for answers

If true, answers do not go in the original document discussion thread. Instead, it will check for the reply_to in tracking message-id and redirected accordingly. This has an impact on the generated message-id.

boolean
res_idRelated Document IDmany2one_reference
snailmail_errorSnailmail message in errorboolean
computed

added by Snail Mail (snailmail)

starredStarred

Current user has a starred notification linked to this message

boolean
computed
starred_partner_idsFavorited Bymany2many
subjectSubjectchar
subtype_idSubtypemany2one
tracking_value_idsTracking values

Tracked values are stored in a separate model. This field allow to reconstruct the tracking and to generate statistics on the model.

one2many

inverse: mail_message_id

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

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.message/search_read" \
  -H "Authorization: bearer $ODOO_API_KEY" \
  -H "X-Odoo-Database: your-db" \
  -H "Content-Type: application/json" \
  -d '{"domain":[],"fields":["subject","message_type","author_guest_id","author_id","mail_activity_type_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.message/search_read",
    headers=headers,
    json={"domain": [], "fields": ["subject","message_type","author_guest_id","author_id","mail_activity_type_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-message">mail.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.