Audit Trail
Who changed what, and when
Choose the models to audit. For every creation, change and deletion of their records, Audit Trail stores the user, the date, the record and, field by field, the old and the new value as the user saw them: names instead of ids, labels instead of technical values. The values of a deleted record stay in its deletion log.


Features
- One rule per model: log creations, changes and deletions, each switchable.
- Starter rules: one click creates rules for contacts, users, products, invoices, sales orders, purchase orders and employees (those installed), leaving out fields that change on their own (chatter, activities, technical counters) and passwords. Models that already have a rule are skipped.
- Export the rules to a JSON file and import them in another database (for example from test to production). The file holds the configuration only, never log data; unknown models, fields, users and groups are skipped and listed.
- Noise tuning: statistics (graph and pivot) of the field changes of the last 30 days by model, field and user, and two buttons for managers on the field changes list, Exclude Field and Exclude User, that add the selected field or user to the exclusions of its rule.
- Exclude fields you don't want in the log, and users or groups whose operations are not logged (for example an integration bot); every change of these exclusions is written to the server log.
- Work done with superuser rights is logged under the user who triggered it.
- Source of each operation: web client, external API (JSON-2, JSON-RPC, XML-RPC), scheduled action, import, server action or other. It is detected on the server and cannot be set through the request context.
- Optional summary in the chatter: on models with a chatter, each logged change is also posted as an internal note (old and new values, visible to the internal users who can read the record), leaving out the fields Odoo already tracks there (up to 1,000 records per change).
- Nobody can edit or delete a log from the interface or the API, administrators included; only the retention cleanup removes old records. Two access levels: Auditor and Manager.
- Retention: record logs are kept forever by default; set a number of days for all models or per rule (at least 7 days), or keep one model's logs forever, and older logs are deleted automatically.
- Two views: one line per operation, or one line per changed field.
- Audit History in the Actions menu of every audited model: opens the logs of the open record or of the selected records. Only auditors and managers see it.
- Exports, imports and prints: each export (the Export button, CSV or XLSX, and direct calls through the external API or the web client), import and printed report of an audited model's records adds one log with the user, the source, the number of records, their IDs (the first 1,000) and the fields or the report. Switchable per rule.
- Side-by-side comparison of a changed text or HTML field, with the removed and added words highlighted. HTML is compared as plain text and never rendered.
- PDF report of the selected logs, and Excel or CSV through Odoo's standard export of the log lists.
- Login history: logins, failed logins (also those refused by the login cooldown, a failed second factor and wrong passwords or API keys sent through the external API) and logouts, with IP address, browser, platform and, when Odoo's GeoIP database is installed, country and city; kept 90 days by default (configurable, at least 7 days). A login that matches no user is never stored, as it could be a password.
- Never logged: file contents, fields limited to some user groups, secret-looking fields (password, token, API key). Models holding credentials cannot be audited.
- Interface in English. Turkish, Arabic and Spanish translations cover the main record log screens; the login history and the options added in version 1.2 (source, exclusions, retention, chatter summary, starter rules, export and import of rules, statistics, history, export/import/print logs, comparison, PDF report) are in English for now.
Field by field

Login history

Rules

Getting started
- Install the module.
- In the user form, give the Audit Trail access right: Auditor (read logs) or Manager (also edits rules).
- Go to Audit Trail > Configuration > Rules and add a rule for each model to audit, or use Load Starter Rules in the same menu. The login history needs no rule.
Your data
Everything is stored in your own Odoo database. The module calls no external service and sends no data anywhere. The login history holds personal data (IP address, browser, location): keep its retention in line with your privacy rules (GDPR, KVKK).
Odoo 19.0 Community (depends on the base and web modules), LGPL-3. Made by Ãmer Aba.
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 2212 |
| Technical Name |
oao_audit_trail |
| License | LGPL-3 |
| Website | https://omeraba.com/apps |
Please log in to comment on this module