OdooWiki OCA HUB

API Log notification

api_log_mail folder_open OCA/rest-framework open_in_new
Tools License: AGPL-3

This module allows to create an activity when an exception is logged in an API logs collection.

auto_awesome What this module does

AI-generated from the code · Odoo 18.0

When an API request fails and an exception is logged, this module can automatically create an activity and/or send an email so the right people are notified.

This module connects the API logging system with Odoo's messaging tools. On each API log collection you can now choose two optional settings: an "Error E-mail Template" and an "Error Activity type".

When an exception is recorded in an API log, the module looks at the collection that log belongs to. If an activity type is configured, an activity of that type is created on the log record. If an email template is configured, an email based on that template is sent for the log record.

  • The email template list only shows templates built for the API log model.
  • The activity type list only shows activity types configured for the API log model.
  • Normal API requests are logged without triggering chatter tracking, so only exceptions produce notifications.

Because the API log now supports activities and messages, users can see the notification activity and the sent email directly on the log entry. The module touches the api.log model and the api.log_collection.mixin used by API log collections.

Depends on

Required by other modules

Models and fields (2)
  • api.log · new model
  • api.log_collection.mixin · extends an existing modelapi_log_mail_exception_template_id (Error E-mail Template), api_log_mail_exception_activity_type_id (Error Activity type)

Text generated by AI (DeepSeek) from reading the Odoo 18.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 3 confirmed, 6 with no information of 9 versions.

Sources · Odoo 18.0

Confirmed on 2026-11-03 in branch 18.0 of OCA/rest-framework.

terminal Installation and usage

OCA documentation · Odoo 18.0

In any log collection that has logging enabled, insert an activity type in "Error Activity type".

No verified information in OCA: Installation, Usage.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.