Foundation module providing version history, scheduled activation, and lifecycle management for any Odoo model. Stores field snapshots with temporal validity tracking, optional approval workflow, and usage tracking to prevent archiving in-use artifacts.
- Store version snapshots in JSON with three relation strategies: shallow (IDs), embed (snapshot data), follow (cascade versions)
- Schedule versions for future activation via daily cron job with supersession chain tracking
- Optional approval workflow (draft → pending → approved → scheduled/current) and test gate enforcement
- Usage tracking prevents archiving artifacts referenced by programs or consumers
| Model | Description |
|---|---|
spp.versioned.mixin |
Abstract mixin to add versioning capabilities to any model |
spp.artifact.version |
Stores version snapshots with state machine (draft/scheduled/current) |
spp.artifact.usage |
Tracks where artifacts are used (prevents orphan archiving) |
spp.artifact.version.schedule.wizard |
Wizard for scheduling version activation with conflict detection |
After installing:
- Verify cron Activate Scheduled Artifact Versions is active under Settings > Technical > Scheduled Actions
- Enable approval globally via system parameter
spp_versioning.require_approval = Trueor per-artifact viais_approval_requiredfield
- Versioned artifacts call
action_view_versions()to open version history oraction_open_schedule_wizard()for scheduling - When used with
spp_studio, menus appear under Studio > Settings > Versioning:- Scheduled Changes (shows upcoming activations)
- Version History (all versions across models)
- Artifact Usages (dependency tracking)
| Group | Access |
|---|---|
base.group_user |
Read versions and usages |
spp_security.group_spp_admin |
Full CRUD, approve/reject |
To add versioning to your model:
Inherit
spp.versioned.mixin:class MyModel(models.Model): _inherit = ["my.model", "spp.versioned.mixin"]
Implement
_get_version_snapshot_fields()to specify fields to snapshot:def _get_version_snapshot_fields(self): return ["name", "category_id", ("program_id", "embed"), ("variable_ids", "follow")]
Optionally implement
_get_test_records()for test gate validation or_apply_version_snapshot(data)to customize snapshot application
spp_security, mail
Table of contents
- Initial migration to OpenSPP2
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.
Do not contact contributors directly about support or help with technical issues.
- OpenSPP.org
Current maintainers:
This module is part of the OpenSPP/OpenSPP2 project on GitHub.
You are welcome to contribute.




