Skip to content

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

  1. Name - Template identifier (required, unique per company)
  2. Description - What's included in this template
  3. Database Source (Selection, required):
    • path - File stored on the server filesystem
    • upload - Binary file uploaded to Odoo
  4. Database File Path - Full server path to the backup file (for path source)
  5. Upload File - Uploaded backup file as attachment (for upload source)
  6. Upload Filename - Name of the uploaded file
  7. Active - Whether this template is available for use (default: True)
  8. Company - Company context

2. Validation Rules

Constraints

  • For path source: the file path must exist on the filesystem
  • For upload source: 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
  1. Admin creates a template by uploading a backup or pointing to a server file
  2. When creating a subscription, the template can be selected in the Database Template field
  3. During the build process, instead of creating an empty database, the template backup is restored
  4. 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