How odoo-dev/odoo works
(nonexistent) file structure
• In a real Odoo repository you’d typically see:
• addons/ – Python modules that implement business logic
• odoo/ or src/odoo/ – core framework code
• doc/, tests/, and tools/ directories
• Configuration files like odoo.conf, requirements.txt, Dockerfile, and CI scripts
• These top-level directories indicate a modular, plug-in architecture where each module (“addon”) registers models, views, controllers, and data files.
README for additional insights
• The real Odoo README describes:
• Supported Python versions
• Deployment options (dev server, docker, package)
• Architecture overview (ORM, controllers, QWeb templates, JS client, etc.)
• Extension points (module manifest files, RPC endpoints)
a. Main components
1. Web Client (Browser UI)
2. HTTP Server / WSGI Gateway
3. Odoo Application Layer
– Controllers / HTTP routing
– ORM & Model Layer
– Business-logic modules (addons)
– Template engine (QWeb)
4. PostgreSQL Database
5. External Services (SMTP, Payment Gateways, LDAP auth, etc.)
6. Optional: Message queue (e.g., Celery/RabbitMQ) for async jobs
7. File store (attachments, filestore)
b. Relationships and interactions
• Browser ↔ HTTP Server over HTTPS
• HTTP Server ↔ Odoo Application through WSGI
• Odoo Application ↔ PostgreSQL via ORM
• Odoo Application ↔ External Services over REST/SMTP/LDAP protocols
• Background workers ↔ Odoo Application through message broker
c. Architectural patterns and principles
– Modular MVC/MVT pattern: separate models, views, controllers
– Plugin architecture: each addon self-registers its models, views, menu entries
– Layered architecture: Presentation (JS + QWeb), Application (Python), Data (DB)
– Event-driven or message-driven background processing
d. Technologies and frameworks
– Python 3.x, psycopg2 (PostgreSQL driver)
– Odoo framework core modules
– JavaScript, XML, QWeb for client-side UI
– HTTP server (Werkzeug, Gunicorn, or Odoo’s built-in)
– PostgreSQL database
– Optional: RabbitMQ/Celery for async tasks, Redis for caching