Audit Logs
Contents
Audit Logs#
OpenSPP includes an audit logging framework implemented by the spp_audit module. It records changes made to
configured models and fields, including old and new values, to support accountability, compliance, and operational
investigations.
What spp_audit logs#
Audit behavior is configured using Audit Rules:
Standard actions (automatic):
create
write
unlink (delete)
Optional actions (explicit logging):
activation / deactivation
generic state changes (for example approve/reject)
file access events (download / preview / export)
Note
The optional actions are logged only when the application code explicitly calls the lifecycle logging helper (the rule flags are “allow lists” for those event types).
Configuring audit rules#
An audit rule defines:
Model: which Odoo model is audited (for example registry, programs, service points)
Fields to log: which fields are tracked (recommended: keep this minimal and meaningful)
Which actions to log: create/write/unlink and optional lifecycle/file events
Some deployments also use rule hierarchy:
Parent Rule + Connecting Field let a rule link changes on a child model back to a parent record (for example a program configuration component posting audit info on the program record).
Viewing and interpreting logs#
Each audit log entry captures:
timestamp
user
model + record identifier
method/action
a “Changes” table showing old vs new values for each changed field
Open a log entry from Audit Log → Audit → Log to see the change details.
Note
Audit rendering respects field-level security when displaying the “Changes” table. If a field is restricted to a group, users without that group will not see that field’s values in the log display.
Default rules (what you may see out of the box)#
The spp_audit module ships default rules for core flows — registry records (res.partner) and service points. Program
and cycle audit rules ship separately in the spp_audit_programs companion module, which auto-installs when both
spp_audit and spp_programs are present. Implementations should review these defaults and adjust them to local
requirements.
Operational considerations#
Performance and storage: auditing increases database write volume and storage usage. Log only the fields you need.
Immutability: audit logs are intended to be tamper-resistant. Deleting audit logs is blocked by default.
Retention: if your deployment requires retention limits, implement them as a deliberate policy (database retention, archiving, or a dedicated retention mechanism), aligned with local regulations.
openspp.org