Audit Trail Export & Lock
Immutable per-period audit trail export and lock evidence pack for auditors
Every statutory audit and Companies House filing eventually demands the same thing: a complete audit trail of postings for the period plus the edit history of every journal entry — and proof none of it was altered after the fact. Odoo logs the data internally, but it is scattered across move lines and chatter and is nowhere near export-ready. This module produces an immutable evidence pack per company and period. It collects every posted journal item, snapshots each entry's field-level edit history, computes a SHA-256 hash chain over the whole pack, and locks the period read-only so the captured figures, history and hash cannot be silently changed. A balanced pack exports to a hash-stamped CSV you hand straight to auditors, and integrity can be re-verified at any time. It runs entirely on your own Odoo data — no external service or certification required.
Key Features
Per-Period Evidence Packs
Each gb.audit.pack covers one company and period; choosing month, quarter or year auto-fills date_from and date_to via _onchange_period. A non-overlap constraint blocks generated or locked packs from covering the same dates twice, keeping the evidence set clean.
Full Posting Capture
action_generate collects every posted account.move.line in range into gb.audit.pack.line records — date, entry, account code/name, partner, label, reference, debit and credit. Computed total_debit, total_credit, balance and is_balanced give an instant period check.
Edit-History Snapshot
_snapshot_history walks each entry's mail.tracking.value records and stores who changed which field, with old and new values and timestamp, into gb.audit.pack.history — exactly the journal edit trail external auditors ask for, frozen into the pack.
SHA-256 Hash Chain
_compute_chain_hash hashes each posting line into a line_hash and folds them into a single chain_hash over the whole pack. Any later change to the captured figures produces a different hash, making tampering provably detectable.
Integrity Re-Verification
action_verify recomputes the chain hash and compares it to the stored value, raising an error if they differ and posting a pass message if they match. Auditors can re-confirm at any time that the evidence has not been altered.
Draft / Generated / Locked Workflow
action_lock only seals a balanced generated pack, stamping locked_on and locked_by. Once locked, overridden write and unlink block any change or deletion of the captured lines, hash and dates — the pack becomes genuinely immutable.
Auditor-Ready CSV Export
_build_export writes a CSV of every line with its line_hash plus the overall evidence chain hash as a footer, stored on the pack. action_download_export streams it via /web/content, ready to hand straight to auditors for statutory or Companies House work.
One-Step Generate-and-Lock Wizard
The gb.audit.pack.generate.wizard takes a company, period type and reference date, derives the range, and on run creates and generates the pack — optionally locking it immediately when balanced — then opens the finished pack.
Use Cases
Screenshots
Generate Evidence Pack
Why Choose This Module
External auditors routinely request a full audit trail of postings plus the edit history of every journal entry. Odoo logs this internally, but the data is scattered and not export-ready. This module collects every posting of a period, snapshots their edit history, computes a tamper-evident hash chain, and locks the period so the evidence cannot be silently altered.
Specifications
- Compatible: Odoo 18.0 / 19.0
- License: OPL-1
- Languages: English
- Author: Pokutsoft
- Dependencies: account
- Support: support@pokutsoft.com
Update date: 2026-07-02