Prerequisites and Requirements
Relevant source files
The following files were used as context for generating this wiki page:
Introduction
The OdooConnectorAPI is a RESTful gateway built with FastAPI to bridge external applications with the Odoo ERP system. To ensure successful deployment and operation, the environment must satisfy specific software dependencies, containerization standards, and configuration parameters. The project is designed to run in diverse environments ranging from local virtual environments to containerized clusters using Docker and Kubernetes.
Sources: README.md:3-8
Software Dependencies
The application relies on a specific set of Python libraries and system-level tools. Python 3.8 or higher is mandatory for the runtime environment. The primary interface for Odoo communication is handled via the odoorpc library, while the web layer is managed by fastapi and uvicorn.
Core Python Requirements
| Package | Purpose |
|---|---|
fastapi | Web framework for building the REST API |
uvicorn | ASGI server implementation for running the application |
odoorpc | Communication library for Odoo JSON-RPC |
python-dotenv | Loading environment variables from .env files |
tox, flake8, pylint | Development, testing, and linting tools |
Sources: requirements.txt:1-7, README.md:12, app/main.py:4-5
Infrastructure and Containerization
The project supports multiple deployment targets, each with its own set of infrastructure requirements.
Local and Containerized Deployment
- Docker & Docker Compose: Required for local orchestration and building the application image.
- PostgreSQL: Version 13 is utilized for the Odoo database backend when using the provided Odoo stack.
- Odoo: Version 17 is the targeted ERP version for the containerized stack.
Kubernetes Deployment
- Kubernetes Cluster: A functional cluster is required for production-like scaling.
- Helm 3: Used for managing the deployment through the
odooconnectorapichart.
Sources: README.md:13-15, odoo/docker-compose.yml:28-44, odoo/docker-compose.yml:25
Deployment Architecture
The following diagram illustrates the relationship between the API, the infrastructure, and the target Odoo environment.
The diagram shows the data flow from external clients through the FastAPI layer to the Odoo backend.
Sources: app/main.py:24-26, odoo/docker-compose.yml:1-55, docker-compose.yml:1-12
Configuration and Environment Variables
Proper initialization of the API requires specific environment variables. These variables are consumed by the FastAPI application to authenticate and connect to the Odoo instance.
Connection Parameters
| Variable | Description | Default (Local) |
|---|---|---|
ODOO_URL | The hostname or IP of the Odoo server | localhost |
ODOO_DB | The name of the Odoo database | mydb |
ODOO_USERNAME | Login username for Odoo | admin |
ODOO_PASSWORD | Login password for Odoo | admin |
Sources: app/main.py:10-14, charts/odooconnectorapi/values.yaml:14-18, docker-compose.yml:9-12
Security Policy
Security and version support are critical prerequisites for production use. The project adheres to a specific support lifecycle.
Supported Versions
| Version | Security Support |
|---|---|
| 1.0.x | Supported |
| < 1.0 | Not Supported |
Sources: SECURITY.md:5-10
Security Connection Flow
When the API attempts to retrieve data (e.g., via the /get/partners endpoint), it follows a specific connection and authentication sequence.
The sequence diagram details the lifecycle of an Odoo connection within an API request.
Sources: app/main.py:23-37
Summary
To deploy the OdooConnectorAPI, developers must ensure a Python 3.8+ environment or a Docker-capable host. The system requires pre-configured access to an Odoo instance, defined through four primary environment variables (ODOO_URL, ODOO_DB, ODOO_USERNAME, ODOO_PASSWORD). Whether deploying via Docker Compose or Helm, the underlying architecture assumes a networked connection between the FastAPI application and an Odoo ERP instance backed by a PostgreSQL database.