Odoo Service Skill
Capabilities
This skill manages the complete Odoo server lifecycle:
- Server: Start, stop, restart, status check (Windows/Linux/macOS)
- Environment: Auto-detect venv/Docker/bare Python; initialize new environments
- Database: Backup, restore, create, drop, list, reset admin password
- Docker: Generate Dockerfiles/compose, manage containers, exec into shells
- IDE: Generate VSCode and PyCharm configurations with debug support
- Module: Install, update, scaffold, refresh module list
- Readiness: Production quality gate (tests, security, translations, manifest)
Environment Detection
Priority order: Docker > venv > bare Python.
| Signal |
Environment |
docker-compose.yml or Dockerfile present |
Docker |
.venv/, venv/, or env/ with Python executable |
Local venv |
| None of the above |
Bare Python |
Override with flags: --docker, --venv, --env bare.
Odoo Version Matrix
| Version |
Python |
Longpolling Key |
Extra Deps |
| 14 |
3.7 - 3.10 |
longpolling_port |
- |
| 15 |
3.8 - 3.11 |
longpolling_port |
- |
| 16 |
3.9 - 3.12 |
gevent_port |
- |
| 17 |
3.10 - 3.13 |
gevent_port |
- |
| 18 |
3.10 - 3.13 |
gevent_port |
cbor2 |
| 19 |
3.10 - 3.13 |
gevent_port |
cbor2, python-magic |
Quick Reference
Server
# Start (dev mode)
python -m odoo -c conf/PROJECT.conf --dev=all
# Start (production)
python -m odoo -c conf/PROJECT.conf --workers=4
# Stop (Windows)
FOR /F "tokens=5" %P IN ('netstat -ano ^| findstr :8069') DO taskkill /PID %P /F
# Stop (Linux/Mac)
lsof -ti:8069 | xargs kill -9
Module Operations
# Install
python -m odoo -c conf/PROJECT.conf -d DB -i MODULE --stop-after-init
# Update (most common after code changes)
python -m odoo -c conf/PROJECT.conf -d DB -u MODULE --stop-after-init
# Refresh module list (before installing NEW modules)
python -m odoo -c conf/PROJECT.conf -d DB --update-list
Database
# Backup (compressed custom format - recommended)
pg_dump -U odoo -h localhost -Fc DBNAME -f backups/DBNAME_YYYYMMDD.dump
# Restore
createdb -U odoo NEWDB && pg_restore -U odoo -d NEWDB backup.dump
# Reset admin password
psql -U odoo -d DBNAME -c "UPDATE res_users SET password='newpass' WHERE login='admin';"
Docker
docker-compose up -d # Start
docker-compose down # Stop
docker-compose up -d --build # Rebuild and start
docker-compose exec odoo bash # Shell into container
Scripts
Located in odoo-service/scripts/ — all standalone, stdlib-only (optional psutil):
| Script |
Purpose |
server_manager.py |
Start/stop/restart/status, module install/update |
env_initializer.py |
Venv creation, PostgreSQL check, config generation |
db_manager.py |
Backup/restore/create/drop, admin password reset |
docker_manager.py |
Dockerfile/compose generation, container lifecycle |
ide_configurator.py |
VSCode/PyCharm config generation |
Config File Format
[options]
addons_path = odoo/addons,projects/PROJECTNAME
admin_passwd = 123
db_host = localhost
db_port = 5432
db_user = odoo
db_password = odoo
dbfilter = PROJECTNAME.*
http_port = 8069
gevent_port = 8072
workers = 0
Naming convention: conf/{PROJECT}{VERSION}.conf (e.g., conf/myproject17.conf).
1---2name: odoo-service3description: Complete Odoo server lifecycle manager — run, deploy, initialize, and manage Odoo across local venv, Docker, and any IDE. Handles server startup/shutdown, environment initialization, database management, Docker orchestration, and IDE configuration for Odoo 14-19. <example> Context: User wants to start the Odoo server user: "Start the Odoo 17 server for my TAQAT project" assistant: "I will activate the virtual environment, locate the TAQAT17.conf config, and start the server with the correct addons path." <commentary>Server start trigger.</commentary> </example> <example> Context: User wants to stop the server user: "Stop the Odoo server" assistant: "I will find and kill the process on port 8069/8072." <commentary>Server stop trigger.</commentary> </example> <example> Context: User wants database backup user: "Backup the taqat17 database" assistant: "I will use pg_dump to create a backup of the taqat17 database with custom format." <commentary>Database operation trigger.</commentary> </example> <example> Conte4license: MIT5---6
7# Odoo Service Skill
8
9## Capabilities
10
11This skill manages the complete Odoo server lifecycle:
12
13- **Server**: Start, stop, restart, status check (Windows/Linux/macOS)
14- **Environment**: Auto-detect venv/Docker/bare Python; initialize new environments
15- **Database**: Backup, restore, create, drop, list, reset admin password
16- **Docker**: Generate Dockerfiles/compose, manage containers, exec into shells
17- **IDE**: Generate VSCode and PyCharm configurations with debug support
18- **Module**: Install, update, scaffold, refresh module list
19- **Readiness**: Production quality gate (tests, security, translations, manifest)
20
21## Environment Detection
22
23Priority order: Docker > venv > bare Python.
24
25| Signal | Environment |
26|--------|-------------|
27| `docker-compose.yml` or `Dockerfile` present | Docker |
28| `.venv/`, `venv/`, or `env/` with Python executable | Local venv |
29| None of the above | Bare Python |
30
31Override with flags: `--docker`, `--venv`, `--env bare`.
32
33## Odoo Version Matrix
34
35| Version | Python | Longpolling Key | Extra Deps |
36|---------|--------|----------------|------------|
37| 14 | 3.7 - 3.10 | `longpolling_port` | - |
38| 15 | 3.8 - 3.11 | `longpolling_port` | - |
39| 16 | 3.9 - 3.12 | `gevent_port` | - |
40| 17 | 3.10 - 3.13 | `gevent_port` | - |
41| 18 | 3.10 - 3.13 | `gevent_port` | cbor2 |
42| 19 | 3.10 - 3.13 | `gevent_port` | cbor2, python-magic |
43
44## Quick Reference
45
46### Server
47
48```bash
49# Start (dev mode)
50python -m odoo -c conf/PROJECT.conf --dev=all
51
52# Start (production)
53python -m odoo -c conf/PROJECT.conf --workers=4
54
55# Stop (Windows)
56FOR /F "tokens=5" %P IN ('netstat -ano ^| findstr :8069') DO taskkill /PID %P /F
57
58# Stop (Linux/Mac)
59lsof -ti:8069 | xargs kill -9
60```
61
62### Module Operations
63
64```bash
65# Install
66python -m odoo -c conf/PROJECT.conf -d DB -i MODULE --stop-after-init
67
68# Update (most common after code changes)
69python -m odoo -c conf/PROJECT.conf -d DB -u MODULE --stop-after-init
70
71# Refresh module list (before installing NEW modules)
72python -m odoo -c conf/PROJECT.conf -d DB --update-list
73```
74
75### Database
76
77```bash
78# Backup (compressed custom format - recommended)
79pg_dump -U odoo -h localhost -Fc DBNAME -f backups/DBNAME_YYYYMMDD.dump
80
81# Restore
82createdb -U odoo NEWDB && pg_restore -U odoo -d NEWDB backup.dump
83
84# Reset admin password
85psql -U odoo -d DBNAME -c "UPDATE res_users SET password='newpass' WHERE login='admin';"
86```
87
88### Docker
89
90```bash
91docker-compose up -d # Start
92docker-compose down # Stop
93docker-compose up -d --build # Rebuild and start
94docker-compose exec odoo bash # Shell into container
95```
96
97## Scripts
98
99Located in `odoo-service/scripts/` — all standalone, stdlib-only (optional `psutil`):
100
101| Script | Purpose |
102|--------|---------|
103| `server_manager.py` | Start/stop/restart/status, module install/update |
104| `env_initializer.py` | Venv creation, PostgreSQL check, config generation |
105| `db_manager.py` | Backup/restore/create/drop, admin password reset |
106| `docker_manager.py` | Dockerfile/compose generation, container lifecycle |
107| `ide_configurator.py` | VSCode/PyCharm config generation |
108
109## Config File Format
110
111```ini
112[options]
113addons_path = odoo/addons,projects/PROJECTNAME
114admin_passwd = 123
115db_host = localhost
116db_port = 5432
117db_user = odoo
118db_password = odoo
119dbfilter = PROJECTNAME.*
120http_port = 8069
121gevent_port = 8072
122workers = 0
123```
124
125Naming convention: `conf/{PROJECT}{VERSION}.conf` (e.g., `conf/myproject17.conf`).