Aller au contenu

Odoo 18 sur Docker

Odoo est un ERP (Enterprise Resource Planning) open-source qui centralise les données métier dans une base de données unifiée. Cette instance Odoo 18 Community fonctionne sur Docker avec PostgreSQL dédié.

ModuleTypeUsage
ProjectNatifGestion de projets et tâches
TimesheetsNatifSuivi du temps par tâche (pour aide aux devis)
WebsiteNatifPage d’atterrissage / hub
CRMNatif (à terme)Gestion des prospects et conversions
project_github_syncCustomSync issues/commits GitHub ↔ tâches Odoo
website_experimentsCustomA/B testing et tracking liens
TimeTrackrCustomIntégration télémétrie Claude Code
┌─────────────────────────────────────────────────────────────┐
│ Funnel de conversion │
├─────────────────────────────────────────────────────────────┤
│ CV / Carte visite → Lien tracké → Website Odoo │
│ │ │
│ ┌───────────┴───────────┐ │
│ ▼ ▼ │
│ Formulaire Prise RDV │
│ contact Cal.com │
│ │ │ │
│ └───────────┬───────────┘ │
│ ▼ │
│ CRM Odoo (Lead) │
│ │ │
│ ▼ │
│ Projet + Devis │
│ (temps estimé via historique) │
└─────────────────────────────────────────────────────────────┘

Pour comprendre pourquoi Odoo a été choisi parmi les alternatives, voir Pourquoi Odoo.


ProblèmeSolution Odoo
Données éparpilléesBase unifiée : projets, temps, contacts
Pas de traçabilitéLien GitHub issue → tâche → temps passé → devis
Attribution marketing floueTracking des sources (CV, carte visite, LinkedIn)
Estimation de devis approximativeHistorique du temps réel par type de tâche
  1. Coût — Enterprise facturé par utilisateur/mois. Community gratuit et auto-hébergé.

  2. Flexibilité — Les modules custom (project_github_sync, website_experiments) sont possibles sur Community sans restriction.

  3. Suffisance fonctionnelle — Les modules natifs Project, Timesheets et Website couvrent les besoins actuels.

  4. Évolutivité — Migration vers Enterprise possible si besoin de modules avancés (eCommerce, Manufacturing).


┌──────────────────────────────────────────┐
│ Caddy (webproxy) │
│ odoo.guigpap.com:443 │
└────────────────┬─────────────────────────┘
▼ (port 8069)
┌──────────────────────────────────────────┐
│ odoo-internal │
│ ┌─────────────────┐ ┌───────────────┐ │
│ │ Odoo 18 │ │ PostgreSQL │ │
│ │ (port 8069) │◄─│ (port 5432) │ │
│ │ │ │ │ │
│ │ - Web UI │ │ - Database │ │
│ │ - XML-RPC API │ │ - User: odoo │ │
│ │ - Custom addons│ │ │ │
│ └─────────────────┘ └───────────────┘ │
└──────────────────────────────────────────┘
services:
odoo:
image: odoo:18
volumes:
- odoo-data:/var/lib/odoo
- odoo-config:/etc/odoo
- ./addons:/mnt/extra-addons
environment:
- HOST=odoo-postgres
- USER=odoo
- PASSWORD=${ODOO_DB_PASSWORD}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8069/web/health"]
interval: 30s
timeout: 10s
retries: 3
networks:
- odoo-internal
- webproxy
odoo-postgres:
image: postgres:15
volumes:
- odoo-db:/var/lib/postgresql/data
environment:
- POSTGRES_USER=odoo
- POSTGRES_PASSWORD=${ODOO_DB_PASSWORD}
- POSTGRES_DB=odoo
networks:
- odoo-internal

Cet addon custom synchronise les issues et commits GitHub avec les projets Odoo.

ModèleChamps ajoutésUsage
project.projectgithub_repo, github_enabledMapping repo ↔ projet
project.taskgithub_issue_id, github_issue_url, github_stateLien issue ↔ tâche
project.task.commitsha, message, author, urlHistorique des commits
GitHub Webhook (N8N)
┌─────────────────────────────────────────┐
│ N8N: Workflow github-project-sync │
│ ├─ Parse event (opened/closed/...) │
│ ├─ Lookup Data Table mapping │
│ └─ Call Odoo XML-RPC │
└───────────────────────┬─────────────────┘
┌─────────────────────────────────────────┐
│ Odoo XML-RPC │
│ ├─ create/write project.task │
│ ├─ Update github_state │
│ └─ Link commits to tasks │
└─────────────────────────────────────────┘
// HTTP Request node vers l'API Odoo
{
"url": "http://odoo:8069/xmlrpc/2/object",
"method": "POST",
"body": {
"service": "object",
"method": "execute_kw",
"args": [
"odoo", // database
2, // uid (après authentification)
"{{ $env.ODOO_PASSWORD }}",
"project.task", // model
"create", // method
[{ // values
"name": "Issue #123: Fix bug",
"project_id": 1,
"github_issue_id": 123
}]
]
}
}

Les backups sont gérés par un workflow N8N :

DéclencheurAction
Intervalle régulierBackup quotidien automatisé
Avant opération risquéeBackup déclenché manuellement via Telegram
FailsafeBackup cron système si N8N indisponible
Fenêtre de terminal
# Backup manuel de la base
docker exec odoo-postgres pg_dump -U odoo odoo > backup_$(date +%Y%m%d).sql
# Restauration
docker exec -i odoo-postgres psql -U odoo odoo < backup_20250120.sql
Fenêtre de terminal
# Installer un nouveau module
cp -r mon_module odoo-stack/addons/
docker restart odoo
# UI: Apps → Update Apps List → Installer
# Mettre à jour un module existant
docker exec odoo odoo -u project_github_sync -d odoo --stop-after-init
Fenêtre de terminal
# Vérifier le health check
curl http://localhost:8069/web/health
# Logs Odoo
docker logs odoo --tail 100
# Test connexion PostgreSQL
docker exec odoo-postgres pg_isready -U odoo
# Shell Odoo pour debug
docker exec -it odoo odoo shell -d odoo

LimiteImpactMitigation
Community sans supportPas de hotline OdooDocumentation + communauté
PostgreSQL single-instancePas de HA nativeBackups réguliers
Modules custom à maintenirCompatibilité future Odoo 19+Tests avant upgrade

Si le volume de leads augmente :

  • Activer le module CRM natif
  • Connecter avec les outils d’emailing (Mailchimp, Brevo)
  • Automatiser les séquences de nurturing via N8N

Si besoin de facturation :

  • Activer le module Invoicing
  • Intégrer avec un prestataire de paiement
  • Workflow devis → facture → encaissement

Si l’estimation des devis doit être plus précise :

  • Intégrer la télémétrie Claude Code via TimeTrackr
  • Analyser le temps réel par type de tâche
  • Créer des templates de devis basés sur l’historique

Si migration vers Enterprise :

  • Export des données et modules custom
  • Vérifier la compatibilité des addons
  • Budget : tarification par utilisateur/mois
IntégrationModule/WorkflowBénéfice
Claude Code télémétrieTimeTrackr addonTemps réel par tâche
Cal.com multi-eventsN8N workflowRDV → CRM automatique
StripeInvoicing + ConnectorPaiement intégré