Odoo Integration¶
Overview¶
Integration setup between OVES Access Management and Odoo ERP system.
Prerequisites¶
- Odoo 16+ instance
- API access credentials
- Network connectivity between systems
Configuration¶
1. Odoo API Setup¶
Enable API access in Odoo:
# In Odoo settings
API_KEY = "your-api-key"
DATABASE = "your-database"
URL = "https://your-odoo-instance.com"
2. OVES Configuration¶
Configure Odoo integration in OVES:
odoo:
url: https://your-odoo-instance.com
database: your-database
username: api-user
api_key: ${ODOO_API_KEY}
# User synchronization settings
sync:
enabled: true
interval: "1h"
fields:
- email
- name
- groups
User Synchronization¶
Automatic Sync¶
OVES automatically synchronizes users from Odoo:
- Fetch Users: Retrieve user list from Odoo
- Map Roles: Convert Odoo groups to OVES roles
- Update Permissions: Apply role-based access controls
Manual Sync¶
Force synchronization:
python scripts/sync_odoo_users.py --force
Data Mapping¶
| Odoo Field | OVES Field | Notes |
|---|---|---|
login | username | Primary identifier |
email | email | Contact information |
name | display_name | Full name |
groups_id | roles | Converted to OVES roles |
Troubleshooting¶
Common Issues¶
Connection Failed - Verify network connectivity - Check API credentials - Ensure Odoo API is enabled
User Sync Errors - Check user data format - Verify role mapping configuration - Review sync logs
Monitoring¶
Monitor integration health:
# Check sync status
curl http://localhost:8000/api/odoo/sync/status
# View sync logs
tail -f logs/odoo-sync.log
This integration supports the single source of truth principle by maintaining user data consistency across systems.