mailing.trace: fields, relations and API
The mailing.trace model ("Mailing Statistics") is a persistent model declared by the Email Marketing module, then extended by 1 other module. It exposes 31 fields, 25 of them declared directly on the model; 2 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
mailing.trace- Label
- Mailing Statistics
- Type
- Persistent (models.Model)
- SQL table
mailing_trace- Origin module
- Email Marketing (
mass_mailing) - Extended by
- mass_mailing_sms
- Default order (_order)
create_date DESC- Display field (_rec_name)
id
Model fields
25 own fields, 0 inherited from mixins and 6 automatic ORM fields. Click a name to get a direct link to that field.
31 of 31 fields shown
| Technical name | Label | Type | Details |
|---|---|---|---|
| campaign_id | Campaign | many2one | read-only related: |
| Email Normalized email address | char | ||
| failure_reason | Failure reason | text | read-only |
| failure_type | Failure type | selection | Values: |
| is_test_trace | Generated for testing | boolean | |
| links_click_datetime | Clicked On Stores last click datetime in case of multi clicks. | datetime | |
| links_click_ids | Links click | one2many | inverse: |
| mail_mail_id | many2one | ||
| mail_mail_id_int | Mail ID (tech) ID of the related mail_mail. This field is an integer field because the related mail_mail can be deleted separately from its statistics. However the ID is needed for several action and controllers. | integer | |
| mass_mailing_id | Mailing | many2one | |
| medium_id | Medium | many2one | related: |
| message_id | Message-ID | char | |
| model | Document model | char | required |
| open_datetime | Opened On | datetime | |
| reply_datetime | Replied On | datetime | |
| res_id | Document ID | many2one_reference | |
| sent_datetime | Sent On | datetime | |
| sms_code | Code | char | added by SMS Marketing ( |
| sms_id | SMS | many2one→ sms.sms | computed added by SMS Marketing ( |
| sms_id_int | SMS ID | integer | added by SMS Marketing ( |
| sms_number | Number | char | added by SMS Marketing ( |
| sms_tracker_ids | SMS Trackers | one2many | inverse: added by SMS Marketing ( |
| source_id | Source | many2one | related: |
| trace_status | Status | selection | Values: |
| trace_type | Type | selection | required Values: |
| 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
- link.tracker.click: links_click_ids
- mail.mail: mail_mail_id
- mailing.mailing: mass_mailing_id
- sms.sms: sms_id
- sms.tracker: sms_tracker_ids
- utm.campaign: campaign_id
- utm.medium: medium_id
- utm.source: source_id
Fields of other models pointing here
- link.tracker.click: mailing_trace_id
- sms.tracker: mailing_trace_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/mailing.trace/search_read" \
-H "Authorization: bearer $ODOO_API_KEY" \
-H "X-Odoo-Database: your-db" \
-H "Content-Type: application/json" \
-d '{"domain":[],"fields":["id","model","trace_type","campaign_id","mail_mail_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}/mailing.trace/search_read",
headers=headers,
json={"domain": [], "fields": ["id","model","trace_type","campaign_id","mail_mail_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/mailing-trace">mailing.trace (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.