Subscription Management
1. Subscription Form
Main subscription record containing all configuration for a SAAS instance
Basic Information
- Name - Auto-generated sequence (e.g., SS-00001), readonly
- Customer - Partner/client who owns this subscription (required)
- State - Current lifecycle state (Draft, Confirmed, Building, Running, Stopped, etc.)
- Subscription Type - Type of deployment (extended by child modules like Docker, DB Filter)
- Domain - Main access domain (e.g., client.saas.com), unique
- Main Domain - Base domain for subdomain generation
- Domain Start - Prefix for auto-generated subdomains
- Start Date - When subscription was activated
- End Date - Expiration date (computed from sale order renewal)
- Grace Period - Days after expiration before auto-stop
Package & Modules
- Subscription Packages - Selected module packages to install (required)
- Database Template - Pre-built database image for quick setup (optional)
Resource Limits
- User Limit - Maximum concurrent users allowed (required)
- Active Users - Current active user count
- Storage Limit - Maximum storage in MB
- Storage Used - Total used storage (computed: database + filestore + addons + stages)
Infrastructure
- Root Server - Server where instance is deployed
- Server IP - Root server IP address, readonly after deployment
- HTTP Port - Application port, readonly
- WebSocket Port - Real-time communication port, readonly
- Odoo Version - Version of the deployed Odoo instance
Domain & DNS
- Customer Domain - Custom domain for white-labeling (e.g., erp.customer.com)
- Redirect Ended To - URL to redirect when subscription expires
- Cloudflare Connector - Cloudflare API connection for DNS management
- Cloudflare Record - DNS A record, auto-created during build
- Cloudflare Proxied - Whether DNS record is proxied through Cloudflare
- Nginx Server - Nginx Proxy Manager instance
- Nginx Host - Reverse proxy configuration, auto-created during build
Git Integration
- Git Integration - Enable/disable repository linking
- Git Account - Git provider credentials
- Repository - Linked repository
- Repository Name - Repository path (Owner/RepoName)
- Branch Name - Branch to deploy from
- Access Token - Personal access token for Git API
- Clear Destination Directory - Remove old files before deploying new commit
- Webhook State - Whether webhook is linked (not_linked / linked)
- Last Commit - Most recent deployed commit
- Git Commit Count - Total commits deployed
Backup Configuration
- Backup Server - Where backups are stored
- Backup UUID - Identifier on backup server, readonly
- Backup State - Health indicator (Normal, Warning, Danger, Not Configured)
- Hourly Backup Count - Number of hourly backups to keep (default: 0 — disabled)
- Daily Backup Count - Number of daily backups to keep (default: 7)
- Weekly Backup Count - Weekly backups to retain (default: 2)
- Monthly Backup Count - Monthly backups to retain (default: 1)
- Keep Latest Backup - Minimum backups to always retain (default: 7)
- 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)
- Enable Code Server - Activate browser-based code editor
- Code Server Domain - Access URL (e.g., code.client.saas.com)
- Code Server Password - Authentication password
- Code Server Port - Internal port, readonly
- Code Server State - Draft, Running, or Stopped
Mobile Notifications
- Notification Server - ntfy server instance
- Mobile Notifications Enabled - Feature toggle
- Monthly Limit - Maximum notifications per month (default: 1000)
- Current Usage - This month's notification count
- Token - Auto-generated authentication token
- Token Status - Active, Expired, or Revoked
Model Limits
Control maximum record counts per Odoo model within the subscription
- Control Model Limit - Enable record quotas
- Model Name - Odoo model to limit (e.g., hr.employee)
- Limit - Maximum records allowed
- 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
- DNS Step - Create Cloudflare DNS record pointing to server IP
- Nginx Step - Create reverse proxy configuration with SSL
- Instance Step - Create database (or restore from template)
- Module Installation - Install all modules from selected packages
- 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
- SQL Input - Query text box
- Execute SQL - Run the query
- 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