Skip to content

Subscription Management

1. Subscription Form

Main subscription record containing all configuration for a SAAS instance

Basic Information

  1. Name - Auto-generated sequence (e.g., SS-00001), readonly
  2. Customer - Partner/client who owns this subscription (required)
  3. State - Current lifecycle state (Draft, Confirmed, Building, Running, Stopped, etc.)
  4. Subscription Type - Type of deployment (extended by child modules like Docker, DB Filter)
  5. Domain - Main access domain (e.g., client.saas.com), unique
  6. Main Domain - Base domain for subdomain generation
  7. Domain Start - Prefix for auto-generated subdomains
  8. Start Date - When subscription was activated
  9. End Date - Expiration date (computed from sale order renewal)
  10. Grace Period - Days after expiration before auto-stop

Package & Modules

  1. Subscription Packages - Selected module packages to install (required)
  2. Database Template - Pre-built database image for quick setup (optional)

Resource Limits

  1. User Limit - Maximum concurrent users allowed (required)
  2. Active Users - Current active user count
  3. Storage Limit - Maximum storage in MB
  4. Storage Used - Total used storage (computed: database + filestore + addons + stages)

Infrastructure

  1. Root Server - Server where instance is deployed
  2. Server IP - Root server IP address, readonly after deployment
  3. HTTP Port - Application port, readonly
  4. WebSocket Port - Real-time communication port, readonly
  5. Odoo Version - Version of the deployed Odoo instance

Domain & DNS

  1. Customer Domain - Custom domain for white-labeling (e.g., erp.customer.com)
  2. Redirect Ended To - URL to redirect when subscription expires
  3. Cloudflare Connector - Cloudflare API connection for DNS management
  4. Cloudflare Record - DNS A record, auto-created during build
  5. Cloudflare Proxied - Whether DNS record is proxied through Cloudflare
  6. Nginx Server - Nginx Proxy Manager instance
  7. Nginx Host - Reverse proxy configuration, auto-created during build

Git Integration

  1. Git Integration - Enable/disable repository linking
  2. Git Account - Git provider credentials
  3. Repository - Linked repository
  4. Repository Name - Repository path (Owner/RepoName)
  5. Branch Name - Branch to deploy from
  6. Access Token - Personal access token for Git API
  7. Clear Destination Directory - Remove old files before deploying new commit
  8. Webhook State - Whether webhook is linked (not_linked / linked)
  9. Last Commit - Most recent deployed commit
  10. Git Commit Count - Total commits deployed

Backup Configuration

  1. Backup Server - Where backups are stored
  2. Backup UUID - Identifier on backup server, readonly
  3. Backup State - Health indicator (Normal, Warning, Danger, Not Configured)
  4. Hourly Backup Count - Number of hourly backups to keep (default: 0 — disabled)
  5. Daily Backup Count - Number of daily backups to keep (default: 7)
  6. Weekly Backup Count - Weekly backups to retain (default: 2)
  7. Monthly Backup Count - Monthly backups to retain (default: 1)
  8. Keep Latest Backup - Minimum backups to always retain (default: 7)
  9. Backup Lines - History of all backups with download/restore actions

Backup States

  • Normal: Latest backup is less than 1 day old
  • Warning: Latest backup is 1-5 days old
  • Danger: Latest backup is more than 5 days old
  • Not Configured: No backup server assigned

Code Server (VS Code)

  1. Enable Code Server - Activate browser-based code editor
  2. Code Server Domain - Access URL (e.g., code.client.saas.com)
  3. Code Server Password - Authentication password
  4. Code Server Port - Internal port, readonly
  5. Code Server State - Draft, Running, or Stopped

Mobile Notifications

  1. Notification Server - ntfy server instance
  2. Mobile Notifications Enabled - Feature toggle
  3. Monthly Limit - Maximum notifications per month (default: 1000)
  4. Current Usage - This month's notification count
  5. Token - Auto-generated authentication token
  6. Token Status - Active, Expired, or Revoked

Model Limits

Control maximum record counts per Odoo model within the subscription

  1. Control Model Limit - Enable record quotas
  2. Model Name - Odoo model to limit (e.g., hr.employee)
  3. Limit - Maximum records allowed
  4. Domain - Filter domain for counting specific records — [] counts every record, [('active', '=', True)] counts only active ones

Model names are unique per subscription, and the limits are pushed to the instance with 🔄 Sync Limits to Server (action_sync_model_limits). The sync also runs automatically whenever a limit line is added, edited or removed.

Requires SaaS Slave and a running subscription

The push targets /sadeem/sync/model_limits on the instance, so it is skipped silently when the subscription is not in state Running or the instance has no SaaS Slave. Invalid fields inside a domain are ignored by the instance rather than breaking the count.


Connect As

Open the customer instance as one of its users, without knowing their password.

The Connect as action reads the instance's user list live (/sadeem/get/logins/<encrypted-timestamp>) and lists each login with a one-click link that lands on the instance through the bypass-login route. The request is authenticated with the transport key, so it works only while the instance is reachable and its SaaS Slave is enabled.

This is real access to customer data

Connecting as a user gives full access to that user's session on the customer's database. Use it for support, and expect the access to be visible in the instance's own logs.


2. Subscription Actions

Available actions depend on the current subscription state

Action From State Description
Confirm Draft Validate and prepare for deployment
Start / Run Confirmed, Stopped Deploy or resume the subscription
Stop Running Pause without deleting data
Cancel Any Full teardown - removes all resources
Reset to Draft Confirmed, Build Failed Return to editable draft state
Migrate Server Running Move the instance to another environment / server — see Server Migration

Migration in progress

While a migration is active the subscription form shows a warning banner and the Migrate Server button is hidden. Avoid Start / Stop / Cancel until the migration reaches Done, Failed or Rolled Back.


3. Build Process

When a subscription is started, it goes through these deployment steps

  1. DNS Step - Create Cloudflare DNS record pointing to server IP
  2. Nginx Step - Create reverse proxy configuration with SSL
  3. Instance Step - Create database (or restore from template)
  4. Module Installation - Install all modules from selected packages
  5. Welcome Email - Send subscription details to customer

Build Failure

If any step fails, the subscription enters Build Failed state. Check the build_fail_message field for error details. Use Reset to Draft to fix configuration and retry.


4. SQL Console

Execute SQL queries directly on the subscription database for debugging

  1. SQL Input - Query text box
  2. Execute SQL - Run the query
  3. SQL Output - Query results

Caution

SQL queries execute directly on the live database. Use with care.


5. Subscription List View

Overview of all subscriptions with filtering and grouping

Key columns: Name, Domain, Customer, State, Storage Used, Active Users, End Date

Filters available: Running, Stopped, Draft, Build Failed, Expiring Soon