TIP: You can type at any time to perform a new search.
Email tracking
mail_tracking · OCA/mail
- Repository
- OCA/mail · module folder · Try on Runboat
- Module version
- Category
- Social Network
- Folder size
- 2.57 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/mail
- Last tracking update
- 2026-08-12 11:28:17
- Authors
- Odoo Community Association (OCA), Tecnativa
- Maintainers
- Odoo Community Association (OCA), Tecnativa
- Committers
- Carlos Lopez, Yann Papouin, Quoc - Pham Ngoc, Pilar Vargas, Weblate, OCA-git-bot, oca-ci
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- mail_tracking_mailgun, mail_tracking_mass_mailing
- Description
This module shows email notification tracking status for any messages in mail thread (chatter). Each notified partner will have an intuitive icon just right to his name.
Code Analysis ⓘ
Views touched (10)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
res_config_settings_view_form |
res.config.settings.view.form.inherit.mail.tracking | res.config.settings | form | Inherits mail.res_config_settings_view_form |
view_mail_tracking_email_form |
mail.tracking.email.form | mail.tracking.email | form | New |
view_mail_tracking_email_search |
mail.tracking.email.search | mail.tracking.email | search | New |
view_mail_tracking_email_tree |
mail.tracking.email.list | mail.tracking.email | list | New |
view_mail_tracking_event_form |
mail.tracking.event.form | mail.tracking.event | form | New |
view_mail_tracking_event_search |
mail.tracking.event.search | mail.tracking.event | search | New |
view_mail_tracking_event_tree |
mail.tracking.event.list | mail.tracking.event | list | New |
view_message_form |
mail.message | form | Inherits mail.mail_message_view_form | |
view_partner_form |
Partner Form with tracking emails | res.partner | form | Inherits base.view_partner_form |
view_res_partner_filter |
Filter bounced partners | res.partner | Inherits base.view_res_partner_filter |
HTTP endpoints (2)
| Route(s) | Handler | Auth | Type | Methods | Flags |
|---|---|---|---|---|---|
/mail/tracking/open/<string:db>/<int:tracking_email_id>/blank.gif, /mail/tracking/open/<string:db>/<int:tracking_email_id>/<string:token>/blank.gif |
MailTrackingController.mail_tracking_open |
none | http | GET | sudo |
/mail/failed/messages |
MailTrackingMailBoxController.discuss_failed_messages |
user | jsonrpc | POST |
Models touched (13)
New fields (0)
No new fields.
Public methods (1)-
send_email(self, message, mail_server_id=None, smtp_server=None, smtp_port=None, smtp_user=None, smtp_password=None, smtp_encryption=None, smtp_ssl_certificate=None, smtp_ssl_private_key=None, smtp_debug=False, smtp_session=None)@api.model
New fields (0)
No new fields.
Public methods (4)-
create(self, vals_list)@api.model_create_multi -
get_aliases(self)@api.model@tools.ormcache()We want to discard these addresses for trackings -
unlink(self) -
write(self, vals)
New fields (0)
No new fields.
Public methods (3)-
create(self, vals_list)@api.model_create_multiWe've got `mail.alias.get_aliases` method which is cached os we need to refresh the cache when we add a new alias domain -
unlink(self)We've got `mail.alias.get_aliases` method which is cached os we need to refresh the cache when we remove an alias domain -
write(self, vals)We've got `mail.alias.get_aliases` method which is cached os we need to refresh the cache when we add a new alias domain
New fields (1)
-
email_bouncedBooleanindex=True
-
email_bounced_set(self, tracking_emails, reason, event=None)Inherit this method to make any other actions to the model that inherit the mixin -
write(self, vals)
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (5)
-
email_ccCharhelp='Additional recipients that receive a "Carbon Copy" of the e-mail' args: 'Cc' -
email_toCharhelp='Raw TO recipients' args: 'To' -
is_failed_messageBooleancompute='_compute_is_failed_message'search='_search_is_failed_message' -
mail_tracking_idsOne2many → mail.tracking.emailbypass_search_access=Truecomodel_name='mail.tracking.email'inverse_name='mail_message_id'string='Mail Trackings' -
mail_tracking_needs_actionBooleandefault=Falsehelp='The message tracking will be considered to filter tracking issues'
-
get_failed_count(self)@api.modelGets the number of failed messages used on discuss mailbox item -
get_failed_messages(self)Returns the list of failed messages to be used by the failed_messages widget -
get_failed_messsage_info(self, ids, model)@api.model -
get_failed_states(self)@api.modelThe 'failed' states of the message -
set_need_action_done(self)This will mark the messages to be ignored in the tracking issues filter -
tracking_status(self)Generates a complete status tracking of the messages by partner
New fields (1)
-
failed_message_idsOne2many → mail.messagedomain=<expr>string='Failed Messages' args: 'mail.message', 'res_id'
-
get_view(self, view_id=None, view_type='form', **options)@api.modelAdd filters for failed messages. These filters will show up on any search views of any model inheriting from ``mail.thread``.
New fields (20)
-
bounce_descriptionCharreadonly=True -
bounce_typeCharreadonly=True -
dateDatecompute='_compute_date'readonly=Truestore=True -
display_nameCharcompute='_compute_tracking_display_name'readonly=Truestore=True -
error_descriptionCharreadonly=True -
error_smtp_serverCharreadonly=Truestring='Error SMTP server' -
error_typeCharreadonly=True -
mail_idMany2one → mail.mailcomodel_name='mail.mail'readonly=Truestring='Email' -
mail_message_idMany2one → mail.messagecomodel_name='mail.message'index=Truereadonly=True -
message_idCharcompute='_compute_message_id' -
nameCharindex=Truereadonly=Truestring='Subject' -
partner_idMany2one → res.partnercomodel_name='res.partner'readonly=True -
recipientCharreadonly=Truestring='Recipient email' -
recipient_addressCharcompute='_compute_recipient_address'index=Truereadonly=Truestore=Truestring='Recipient email address' -
senderCharreadonly=Truestring='Sender email' -
stateSelectiondefault=Falsehelp=" * The 'Error' status indicates that there was an error when trying to sent the email, for example, 'No valid recipient'\n * The 'Sent' status indicates that message was succesfully sent via outgoing email server (SMTP).\n * The 'Delivered' status indicates that message was succesfully delivered to recipient Mail Exchange (MX) server.\n * The 'Opened' status indicates that message was opened or clicked by recipient.\n * The 'Rejected' status indicates that recipient email address is blacklisted by outgoing email server (SMTP). It is recomended to delete this email address.\n * The 'Spam' status indicates that outgoing email server (SMTP) consider this message as spam.\n * The 'Unsubscribed' status indicates that recipient has requested to be unsubscribed from this message.\n * The 'Bounced' status indicates that message was bounced by recipient Mail Exchange (MX) server.\n * The 'Soft bounced' status indicates that message was soft bounced by recipient Mail Exchange (MX) server.\n"index=Truereadonly=True args: [('error', 'Error'), ('deferred', 'Deferred'), ('sent', 'Sent'), ('delivered', 'Delivered'), ('opened', 'Opened'), ('rejected', 'Rejected'), ('spam', 'Spam'), ('unsub', 'Unsubscribed'), ('bounced', 'Bounced'), ('soft-bounced', 'Soft bounced')] -
timeDatetimeindex=Truereadonly=True -
timestampFloatdigits='MailTracking Timestamp'readonly=Truestring='UTC timestamp' -
tokenChardefault=<expr>groups='base.group_system'readonly=Truestring='Security Token' -
tracking_event_idsOne2many → mail.tracking.eventcomodel_name='mail.tracking.event'inverse_name='tracking_email_id'readonly=Truestring='Tracking events'
-
create(self, vals_list)@api.model_create_multi -
email_is_bounced(self, email)@api.model -
email_score(self)Default email score algorimth. Ready to be inherited It can receive a recordset or mapped states dictionary via context. Must return a value beetwen 0.0 and 100.0 - Bad reputation: Value between 0 and 50.0 - Unknown reputation: Value 50.0 - Good reputation: Value between 50.0 and 100.0 -
email_score_from_email(self, email)@api.model -
event_create(self, event_type, metadata) -
read(self, fields=None, load='_classic_read')Override to explicitly call check_access, that is not called by the ORM. It instead directly fetches ir.rules and apply them. -
smtp_error(self, mail_server, smtp_server, exception) -
tracking_img_add(self, email) -
write(self, vals)
New fields (19)
-
dateDatecompute='_compute_date'readonly=Truestore=True -
error_descriptionCharreadonly=True -
error_detailsTextreadonly=True -
error_typeCharreadonly=True -
event_typeSelectionreadonly=Trueselection=[('sent', 'Sent'), ('delivered', 'Delivered'), ('deferral', 'Deferral'), ('hard_bounce', 'Hard bounce'), ('soft_bounce', 'Soft bounce'), ('open', 'Open'), ('click', 'Clicked'), ('spam', 'Spam'), ('unsub', 'Unsubscribed'), ('reject', 'Rejected')] -
ipCharreadonly=Truestring='User IP' -
mobileBooleanreadonly=Truestring='Is mobile?' -
os_familyCharreadonly=Truestring='Operating system family' -
recipientCharreadonly=True -
recipient_addressCharcompute='_compute_recipient_address'index=Truereadonly=Truestore=Truestring='Recipient email address' -
smtp_serverCharreadonly=Truestring='SMTP server' -
timeDatetimereadonly=True -
timestampFloatdigits='MailTracking Timestamp'readonly=Truestring='UTC timestamp' -
tracking_email_idMany2one → mail.tracking.emailcomodel_name='mail.tracking.email'index=Trueondelete='cascade'readonly=Truerequired=Truestring='Message' -
ua_familyCharreadonly=Truestring='User agent family' -
ua_typeCharreadonly=Truestring='User agent type' -
urlCharreadonly=Truestring='Clicked URL' -
user_agentCharreadonly=True -
user_country_idMany2one → res.countrycomodel_name='res.country'readonly=Truestring='User country'
-
process_click(self, tracking_email, metadata)@api.model -
process_deferral(self, tracking_email, metadata)@api.model -
process_delivered(self, tracking_email, metadata)@api.model -
process_hard_bounce(self, tracking_email, metadata)@api.model -
process_open(self, tracking_email, metadata)@api.model -
process_reject(self, tracking_email, metadata)@api.model -
process_sent(self, tracking_email, metadata)@api.model -
process_soft_bounce(self, tracking_email, metadata)@api.model -
process_spam(self, tracking_email, metadata)@api.model -
process_unsub(self, tracking_email, metadata)@api.model
New fields (1)
-
mail_tracking_show_aliasesBooleandefault=Falsestring='Show Aliases in Mail Tracking'
No public methods.
New fields (2)
-
mail_tracking_email_max_age_daysIntegerconfig_parameter='mail_tracking.mail_tracking_email_max_age_days'help='If set as positive integer enables the deletion of old mail tracking records to reduce the database size.' args: 'Max age in days of mail tracking email records' -
mail_tracking_show_aliasesBooleanreadonly=Falserelated='company_id.mail_tracking_show_aliases'
No public methods.
New fields (2)
-
email_scoreFloatcompute='_compute_email_score_and_count'readonly=True -
tracking_emails_countIntegercompute='_compute_email_score_and_count'readonly=True
No public methods.
New fields (0)
No new fields.
Public methods (0)No public methods.
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…