Connecting to Self-Hosted Odoo
This guide covers connecting Pricelist Heaven to self-hosted (on-premise) Odoo installations.
Prerequisites
- Self-hosted Odoo installation (17.0 or 18.0)
- Administrator or API user access
- Server URL accessible from the internet
- Firewall configured to allow API access
Network Requirements
Your self-hosted Odoo must be accessible from the internet for Pricelist Heaven to connect. The following URLs must be reachable:
/web/session/authenticate- For authentication/jsonrpc- For API calls
Step 1: Prepare Your Odoo Instance
Enable External API Access
- Log in to Odoo as administrator
- Go to Settings → Technical → System Parameters
- Add or verify these parameters:
| Parameter | Value | Description |
|---|---|---|
web.base.url | Your server URL | Must match your server's address |
xmlrpc | True | Enables XML-RPC API |
Create an API User (Recommended)
Instead of using your admin account, create a dedicated API user:
- Go to Settings → Users & Companies → Users
- Click "Create"
- Fill in:
- Name: "Pricelist Heaven API"
- Email: A valid email (e.g., api@yourcompany.com)
- Access Rights: Administrator
- Save
- Generate API Key:
- Open the user's form
- Go to "API Keys" tab
- Click "New API Key"
- Copy the generated key
Security Tip: Store this API key securely. It provides full access to your Odoo database.
Step 2: Configure Firewall
Ensure your firewall allows HTTPS connections from Pricelist Heaven's servers:
- Port: 443 (HTTPS) or your custom port
- Protocol: HTTPS (required for security)
- Source: Allow from any IP (or contact support for specific IP ranges)
Important: HTTP (non-encrypted) connections are not supported for security reasons.
Step 3: Enter Connection Details in Pricelist Heaven
- Log in to Pricelist Heaven
- Go to Dashboard → Settings → Odoo Configuration
Fill in the Form
Odoo URL
https://erp.yourcompany.com
or
https://yourserver.com:8069
Note: Include the port if you're not using standard HTTPS (443)
Database Name
The exact name of your Odoo database:
production
Odoo Version
Select your Odoo version:
- Odoo 17.0
- Odoo 18.0
Username
For password authentication:
admin
For API key authentication:
api@yourcompany.com
Password or API Key
- If using password: enter the user's password
- If using API key: paste the generated API key
Recommendation: Always use API keys for better security
Step 4: Test Connection
- Click "Test Connection"
- Wait for the result (may take 10-15 seconds for self-hosted)
Success Indicators
- ✓ Green checkmark
- "Connection successful" message
- Available languages listed
Common Errors
"Cannot reach server"
- Verify the URL is correct and accessible from your browser
- Check firewall settings
- Ensure HTTPS is properly configured
"SSL Certificate Error"
- Install a valid SSL certificate (Let's Encrypt is free)
- Self-signed certificates are not supported
"Authentication failed"
- Check username and password/API key
- Verify the user has administrator access
- For API keys, ensure the key hasn't expired
"Database not found"
- Check the database name spelling
- For multi-database setups, use the exact database name
Step 5: Sync Odoo References
After successful connection:
- Go to Dashboard → Odoo
- Click "Sync References"
- Wait for completion
This syncs:
- Product categories
- Units of measure
- Taxes
- Stock routes (if inventory module is installed)
- E-commerce categories (if website module is installed)
Performance Optimization
For optimal performance with self-hosted installations:
1. Server Resources
Ensure your Odoo server has adequate resources:
- CPU: 2+ cores for API handling
- RAM: 4GB+ available
- Network: Low latency connection
2. Odoo Workers
Configure multiple Odoo workers in odoo.conf:
workers = 4
limit_request = 8192
limit_time_cpu = 600
limit_time_real = 1200
3. Reverse Proxy
Use Nginx or Apache as a reverse proxy:
- Handles SSL termination
- Caching of static resources
- Load balancing (if using multiple Odoo instances)
Example Nginx configuration:
server {
listen 443 ssl;
server_name erp.yourcompany.com;
ssl_certificate /path/to/cert.pem;
ssl_certificate_key /path/to/key.pem;
location / {
proxy_pass http://localhost:8069;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Security Best Practices
- Use HTTPS: Never expose Odoo over HTTP
- Use API Keys: Prefer API keys over passwords
- Limit Access: Create a dedicated API user with only necessary permissions
- Monitor Logs: Regularly check Odoo logs for suspicious API activity
- Update Regularly: Keep Odoo updated to the latest patch version
Troubleshooting
Issue: Slow API Responses
- Check server resources (CPU/RAM usage)
- Increase Odoo worker count
- Verify database performance (run VACUUM on PostgreSQL)
Issue: Intermittent Failures
- Check network stability between your server and Pricelist Heaven
- Review Odoo server logs for errors
- Verify PostgreSQL connection pool settings
Issue: Permission Denied Errors
Ensure the API user has these access rights:
- Product: Create, Read, Write
- Product Supplier Info: Create, Read, Write
- Product Category: Read
- Unit of Measure: Read
- Taxes: Read
Next Steps
Your self-hosted Odoo is now connected! You can: