Audit Log Archive Manager
Verified, bounded, preservation-first lifecycle control for OCA Audit Log.
Control audit-table growth without losing the evidence trail
Publish complete event envelopes to uniquely identified archive batches, verify integrity, then remove only the reconciled source population.
Source removal is blocked until the canonical archive passes identity, count, structure, storage, and digest checks.
Oldest-first batches cap each scheduled execution, supporting measured throughput and backlog control.
Every event has a JSONL envelope. Binary payload exclusions remain explicit and counted.
A changed or missing destination device or persistent marker blocks export and deletion instead of creating a replacement directory.
Operational controls
- Database-wide policy aligned with the OCA audit event ownership model
- Canonical UTF-8 JSONL plus spreadsheet-safe CSV presentation
- Archive, event-stream, source-selection, and destination identity verification
- Destruction hold, competing-cleanup detection, and restart reconciliation
- Read-only auditor role, manager role, batch ledger, and policy change history
- No purge-only mode and no silent overwrite of an existing archive
One policy, visible safeguards
Configure retention and capacity, validate the archive destination, apply a destruction hold when needed, and review the latest processing result from one database-wide policy.
Persistent archive ledger
Every batch keeps its fixed selection, state, reconciliation counts, archive size, completion time, and verification evidence for operational review.
Requirements
Requires the OCA auditlog addon and a pre-created durable archive directory that supports hard links. The Odoo service account needs read, write, and link permissions. Backup, encryption, storage immutability, and jurisdiction-specific retention remain deployment responsibilities.
Changelog
Version 19.0.1.0.0
2026-10-26
- Added Odoo 19 support with the official OCA ``auditlog`` 19.0 dependency.
- Bounded oldest-first batches publish canonical JSONL evidence and spreadsheet-safe CSV before reconciled source deletion.
- Archive verification checks destination identity, the fixed source selection, event identities, counts, structure, and digests before deletion is permitted.
- Added destination validation, destruction holds, competing-cleanup detection, restart reconciliation, role-separated access, notifications, and a persistent batch ledger.
- The Lifecycle Policy menu opens the database-wide policy directly, avoiding an empty non-creatable list during initial setup.
- HTTP request and session cleanup follows the policy's HTTP-context inclusion choice.
- Added Arabic translations for lifecycle policy controls, archive ledger states, validation feedback, safeguards, and operational messages.
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
Discuss (mail)
|
| Community Apps Dependencies | Show |
| Lines of code | 2742 |
| Technical Name |
auditlog_lifecycle_manager |
| License | AGPL-3 |
| Website | https://www.ameerweb.com |
Audit Log Archive Manager
For Odoo 19 Enterprise and Community. Package version: 19.0.1.0.0
See the Changelog for release history.
Audit Log Archive Manager controls growth in the OCA auditlog tables by publishing old events to independently verifiable archive batches before removing the reconciled source records.
Prerequisites
- Install the OCA auditlog addon and configure the audit rules you require.
- Create a durable server-side archive directory before configuration. The addon deliberately does not create a missing directory or mount point.
- Grant the Odoo service account read, write, create, delete, and hard-link permissions in that directory.
- Arrange backup, encryption, access control, monitoring, and storage immutability according to your organisation's requirements.
Installation
- Add the module to an Odoo addons path and update the Apps list.
- Install Audit Log Archive Manager.
- Assign Audit Lifecycle Manager to administrators who configure or run the lifecycle. Assign Audit Lifecycle Auditor to users who only inspect policy and batch evidence.
Configuration
- Open Audit > Lifecycle > Lifecycle Policy. The menu opens the single database-wide policy directly.
- Enter the existing absolute archive directory, online retention period, and maximum events per batch.
- Decide whether archived event envelopes should include available HTTP request and session context. When disabled, orphan HTTP context records are retained.
- Disable OCA's independent Auto-vacuum audit logs scheduled action and any legacy audit-log purge job. The policy cannot be enabled while a known competing cleanup is active.
- Select Validate Destination. Validation checks write access, atomic hard-link publication, free space, the filesystem device, and a persistent marker stored on the destination.
- Review the result and enable the policy. Changing the archive directory later disables the policy and requires validation again.
- Optionally select internal notification users who should receive batch results.
Everyday workflow
The scheduled action processes at most one oldest-first batch per run. You can select Queue Next Batch on the policy when an additional run is needed. Monitor Audit > Lifecycle > Archive Batches for selection counts, archive paths, digests, deletion reconciliation, and notification state.
Each ZIP contains:
- manifest.json with the batch, database, storage, policy, count, and digest identities;
- events.jsonl as the canonical UTF-8 evidence stream; and
- presentation.csv as a spreadsheet-safe operational view.
The service verifies the archive members, filesystem device, persistent storage marker, fixed source IDs, event IDs, counts, and SHA-256 digests before it removes selected source events. Existing archive filenames are never overwritten.
Destruction hold and recovery
Enable Destruction Hold and enter a reason to block new batches and source deletion immediately. Interrupted batches remain in the ledger. A failed pre-deletion export can be retried by a lifecycle manager. A batch that reached a destructive boundary is marked Needs Reconciliation and must pass verification again before cleanup resumes.
Troubleshooting
- The policy cannot be activated
- Validate the destination and disable the competing cleanup named in the policy warning.
- The destination validation fails
- Confirm that the directory already exists on the Odoo server, the intended storage is mounted, and the Odoo service account can create files and hard links.
- Storage identity changed or marker missing
- Restore the intended mount. Do not validate a temporary local replacement path. Validate only after the durable destination is confirmed.
After upgrading from an earlier package version, validate the destination again before reactivating the policy.
- A batch needs reconciliation
- Preserve the archive and database state, review the batch error, restore the expected destination if necessary, and use Verify Archive before retrying.
Scope and limitations
The module preserves events already captured by OCA auditlog. It cannot reconstruct events excluded by audit rules, excluded users or fields, direct SQL updates, or other capture limitations. It does not replace off-server backup, encryption, immutable storage, legal review, or monitoring.
Changelog
19.0.1.0.0 - 2026-10-26
- Added Odoo 19 support with the official OCA auditlog 19.0 dependency.
- Bounded oldest-first batches publish canonical JSONL evidence and spreadsheet-safe CSV before reconciled source deletion.
- Archive verification checks destination identity, the fixed source selection, event identities, counts, structure, and digests before deletion is permitted.
- Added destination validation, destruction holds, competing-cleanup detection, restart reconciliation, role-separated access, notifications, and a persistent batch ledger.
- The Lifecycle Policy menu opens the database-wide policy directly, avoiding an empty non-creatable list during initial setup.
- HTTP request and session cleanup follows the policy's HTTP-context inclusion choice.
- Added Arabic translations for lifecycle policy controls, archive ledger states, validation feedback, safeguards, and operational messages.
Support
Use the support contact shown on the app listing. Include the module version, Odoo edition, batch identity, and the complete error message. Do not attach archive contents unless your organisation has approved their disclosure.
Please log in to comment on this module