Skip to content

Architecture

This section documents the technical architecture of the CNF Odoo implementation, including system design, integrations, and technical decisions.

System Overview

The CNF Odoo system is built on Odoo 13.0 Community Edition with custom modules and integrations to support CNF's specific business requirements.

Core Components

  1. Odoo Server
  2. Python-based application server
  3. PostgreSQL database backend
  4. Multi-tenant architecture support

  5. Custom Modules

  6. CNF-specific business logic
  7. Extended functionality for existing modules
  8. Integration connectors

  9. External Integrations

  10. GrocerKey e-commerce platform
  11. CRS (Customer Relationship System)
  12. PRATS inventory system
  13. SFTP document exchange

Architecture Principles

Modularity

  • Separate concerns into distinct modules
  • Minimize inter-module dependencies
  • Use Odoo's inheritance mechanisms appropriately

Scalability

  • Horizontal scaling through load balancing
  • Database optimization and indexing
  • Caching strategies for performance

Maintainability

  • Follow Odoo development guidelines
  • Comprehensive documentation
  • Automated testing where possible
  • Version control for all customizations

Module Architecture

Standard Modules Used

  • purchase - Purchase order management
  • stock - Inventory and warehouse management
  • account - Financial accounting
  • product - Product catalog management

Custom Modules

  • cnf_purchase_extended - Purchase workflow customizations
  • cnf_warehouse_ops - Warehouse operation enhancements
  • cnf_integrations - External system connectors
  • cnf_reports - Custom reporting functionality

Integration Architecture

API Layer

External System <-> API Gateway <-> Odoo Connector <-> Odoo Core

Data Flow Patterns

  1. Synchronous Operations
  2. Real-time API calls
  3. Immediate response required
  4. Used for critical operations

  5. Asynchronous Operations

  6. Job queue processing
  7. Batch operations
  8. Background synchronization

Security Architecture

Authentication

  • Odoo native authentication
  • API key management for integrations
  • Role-based access control (RBAC)

Data Security

  • SSL/TLS for all communications
  • Database encryption at rest
  • Audit logging for sensitive operations

Infrastructure

Production Environment

  • Load-balanced web servers
  • Dedicated database server
  • Redis for caching and job queue
  • NGINX reverse proxy

Development/Staging

  • Containerized environments
  • Automated deployment pipelines
  • Snapshot-based data refresh

Technical Decisions

Decision Records

Use of Job Queue for Integrations

Context: Need to handle long-running integration tasks without blocking user operations Decision: Implement Odoo Connector job queue Consequences: Better user experience, complex error handling

Custom Module Naming Convention

Context: Need consistent naming for custom modules Decision: Prefix all custom modules with cnf_ Consequences: Clear distinction between standard and custom code

Diagrams

System Architecture

graph TD A[Web Browser] --> B[NGINX] B --> C[Odoo Web Server] C --> D[PostgreSQL] C --> E[Redis Cache] C --> F[Job Queue] F --> G[External APIs]

Module Dependencies

graph LR A[cnf_purchase_extended] --> B[purchase] A --> C[stock] D[cnf_warehouse_ops] --> C E[cnf_integrations] --> A E[cnf_integrations] --> D