Custom modules
Contents
Custom modules#
For: developers
This section walks you through creating a custom Odoo module for OpenSPP. OpenSPP modules follow standard Odoo module conventions with additional naming rules, security patterns, and mixins specific to the platform.
Before you start#
Make sure you have:
A working development environment
Basic understanding of the architecture (especially the module organization and data model)
Quick start checklist#
Creating a new OpenSPP module involves these steps:
Scaffold — Create the directory structure, manifest, and init files
Models — Define your models using the
spp.*namespace with correct field namingSecurity — Set up the three-tier group hierarchy, ACLs, and record rules
Views — Create form, list, and search views with the correct XML ID naming
Mixins — Integrate OpenSPP mixins for approval workflows, source tracking, etc.
Tests — Write tests using
TransactionCasewith role-based access testing
Topics covered#
Module scaffold: Directory structure, manifest, and initial files
Models: The
spp.*namespace, field naming rules, and model patternsSecurity: Three-tier group architecture, ACLs, and record rules
Views and menus: XML ID conventions, view patterns, and menu structure
Mixins: Available OpenSPP mixins and when to use them
Testing: Test patterns, helpers, and role-based testing
Example: custom registry fields: Complete walkthrough building a module that adds fields to the individual registry
openspp.org