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 name | Label | Type | Details |
|---|---|---|---|
| account_audit_log_account_id | Account | many2one | computed added by Invoicing ( |
| account_audit_log_company_id | Company | many2one | computed added by Invoicing ( |
| account_audit_log_move_id | Journal Entry | many2one | computed added by Invoicing ( |
| account_audit_log_partner_id | Partner | many2one | computed added by Invoicing ( |
| account_audit_log_preview | Description | text | computed added by Invoicing ( |
| account_audit_log_restricted | Protected by restricted Audit Logs | boolean | computed added by Invoicing ( |
| account_audit_log_tax_id | Tax | many2one | computed added by Invoicing ( |
| attachment_ids | Attachments | many2many | |
| author_avatar | Author's avatar | binary | related: |
| author_guest_id | Guest | many2one | |
| author_id | Author Author of the message. If not set, email_from may hold an email address that did not match any partner. | many2one | |
| body | Contents | html | |
| call_history_ids | Call History | one2many | inverse: |
| channel_id | Channel | many2one | computed |
| child_ids | Child Messages | one2many | inverse: |
| date | Date | datetime | |
| email_add_signature | Email Add Signature | boolean | |
| 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 | |
| email_layout_xmlid | Layout | char | |
| has_error | Has error | boolean | computed |
| has_sms_error | Has SMS error | boolean | computed added by SMS gateway ( |
| incoming_email_cc | Emails Cc | char | |
| incoming_email_to | Emails To | text | |
| is_current_user_or_guest_author | Is Current User Or Guest Author | boolean | computed |
| is_internal | Employee Only Hide to public / portal users, independently from subtype configuration. | boolean | |
| letter_ids | Letter | one2many | inverse: added by Snail Mail ( |
| linked_message_ids | Linked Message | many2many | computed |
| mail_activity_type_id | Mail Activity Type | many2one | |
| mail_ids | Mails | one2many | inverse: |
| mail_server_id | Outgoing mail server | many2one | |
| message_id | Message-Id Message unique identifier | char | read-only |
| message_link_preview_ids | Message Link Preview | one2many | inverse: |
| message_type | Type 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: |
| model | Related Document Model | char | |
| needaction | Need Action | boolean | computed |
| notification_ids | Notifications | one2many | inverse: |
| notified_partner_ids | Partners with Need Action | many2many | |
| outgoing_email_to | emails To | char | |
| parent_id | Parent Message | many2one | |
| partner_ids | Recipients | many2many | |
| pinned_at | Pinned Datetime at which the message has been pinned | datetime | |
| preview | Preview The text-only beginning of the body used as email preview. | char | computed |
| rating_id | Rating | many2one | computed added by Customer Rating ( |
| rating_ids | Related ratings | one2many | inverse: added by Customer Rating ( |
| rating_value | Rating Value | float | computed added by Customer Rating ( |
| reaction_ids | Reactions | one2many | inverse: |
| record_alias_domain_id | Alias Domain | many2one | |
| record_company_id | Company | many2one | |
| record_name | Message Record Name | char | computed |
| reply_to | Reply-To Reply email address. Setting the reply_to bypasses the automatic thread creation. | char | |
| reply_to_force_new | No 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_id | Related Document ID | many2one_reference | |
| snailmail_error | Snailmail message in error | boolean | computed added by Snail Mail ( |
| starred | Starred Current user has a starred notification linked to this message | boolean | computed |
| starred_partner_ids | Favorited By | many2many | |
| subject | Subject | char | |
| subtype_id | Subtype | many2one | |
| tracking_value_ids | Tracking 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: |
| 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
- account.account: account_audit_log_account_id
- account.move: account_audit_log_move_id
- account.tax: account_audit_log_tax_id
- discuss.call.history: call_history_ids
- discuss.channel: channel_id
- 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.guest: author_guest_id
- mail.mail: mail_ids
- mail.message: child_ids, linked_message_ids, parent_id
- mail.message.link.preview: message_link_preview_ids
- mail.message.reaction: reaction_ids
- mail.message.subtype: subtype_id
- mail.notification: notification_ids
- mail.tracking.value: tracking_value_ids
- rating.rating: rating_id, rating_ids
- res.company: account_audit_log_company_id, record_company_id
- res.partner: account_audit_log_partner_id, author_id, notified_partner_ids, partner_ids, starred_partner_ids
- snailmail.letter: letter_ids
Fields of other models pointing here
- chatbot.message: mail_message_id
- discuss.call.history: start_call_message_id
- discuss.channel: from_message_id
- discuss.channel.member: fetched_message_id, seen_message_id
- mail.compose.message: parent_id
- mail.group.message: mail_message_id
- mail.mail: mail_message_id
- mail.message: linked_message_ids, parent_id
- mail.message.link.preview: message_id
- mail.message.reaction: message_id
- mail.message.schedule: mail_message_id
- mail.message.translation: message_id
- mail.notification: mail_message_id
- mail.tracking.value: mail_message_id
- rating.rating: message_id
- sms.sms: mail_message_id
- snailmail.letter: message_id
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.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}'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.