Database Templates
1. Template Overview
Database templates are pre-built database snapshots used as starting points when creating new subscriptions or stages, allowing quick setup with pre-configured data and modules.
Fields
- Name - Template identifier (required, unique per company)
- Description - What's included in this template
- Database Source (Selection, required):
path- File stored on the server filesystemupload- Binary file uploaded to Odoo
- Database File Path - Full server path to the backup file (for
pathsource) - Upload File - Uploaded backup file as attachment (for
uploadsource) - Upload Filename - Name of the uploaded file
- Active - Whether this template is available for use (default: True)
- Company - Company context
2. Validation Rules
Constraints
- For
pathsource: the file path must exist on the filesystem - For
uploadsource: the file must not be empty - Template name must be unique per company
3. How Templates Work
Template (backup file) → Subscription/Stage creation → Database restore → Module installation
- Admin creates a template by uploading a backup or pointing to a server file
- When creating a subscription, the template can be selected in the Database Template field
- During the build process, instead of creating an empty database, the template backup is restored
- After restore, the subscription's package modules are installed on top
Use Cases
- Pre-configured demo databases for quick customer onboarding
- Industry-specific setups (e.g., retail, manufacturing, services)
- Standard configurations with chart of accounts, fiscal positions, and base data