Dependency Management Guide
Understanding Module Dependencies
Module dependencies in the CNF Odoo system form a complex web. Understanding and managing these dependencies is crucial for a successful upgrade.
Dependency Visualization
The CNF Odoo 18 Upgrade - Remaining Dependencies 2025-05-29.xlogic file provides a visual dependency map showing the upgrade path from Odoo 13 to 18.
Core Dependency Chains
1. Foundation Layer
These modules have no dependencies and form the base:
2. Queue Job Infrastructure
Critical for async processing:
3. POS System Chain
Point of Sale functionality:
point_of_sale → pos_utils → pos_promotions → pos_cnf
↘ pos_subline
↘ pos_returns
↘ pos_session_date → pos_rest_api
4. Inventory Management
Stock and warehouse operations:
stock → stock_move_backdate → stock_inventory_queued → stock_planner
↘ cnf_stock_scheduler
↘ merp_base → merp_picking_advanced_search → merp_picking_wave_base
5. Connector Framework
Integration infrastructure:
Critical Dependencies
Most Depended Upon Modules
- cnf_account_loc_costcenters (18 dependencies)
- Core to accounting and location management
-
Required by POS, inventory, and accounting modules
-
cnf_queue_job (15 dependencies)
- Async job processing infrastructure
-
Critical for performance-intensive operations
-
pos_utils (10 dependencies)
- Foundation for all POS functionality
-
Cannot be removed without breaking POS
-
cnf_model_customizeations (8 dependencies)
- Base model modifications
- Affects core Odoo models
Circular Dependencies
Be aware of these circular relationships: - None identified in current analysis (good!)
Dependency Resolution Strategy
Phase 1: Foundation (No Dependencies)
basemodulesmuk_utilsproductstandalone modulesweb_tree_decoration_indent
Phase 2: Infrastructure (Few Dependencies)
queue_jobandcnf_queue_jobcomponentframeworkcnf_model_customizeationscnf_account_loc_costcenters
Phase 3: Business Logic (Many Dependencies)
- POS module chain
- Inventory management chain
- Accounting extensions
- Purchase workflow
Phase 4: Integration & UI
- Connector modules
- Theme and website modules
- API interfaces
Handling Third-Party Dependencies
VentorTech Modules
- Start with
merp_baseandventor_base - Follow their upgrade guides
- Test warehouse operations thoroughly
Emipro Modules
- Currently marked as unused
- Consider removing if not needed
- Otherwise, check vendor for v18 compatibility
Dependency Checking Commands
Check Module Dependencies
# In Odoo shell
module = env['ir.module.module'].search([('name', '=', 'module_name')])
print("Depends on:", module.dependencies_id.mapped('name'))
print("Required by:", module.dependent_ids.mapped('name'))
Find Circular Dependencies
# Script to detect circular dependencies
def find_circular_deps(module_name, visited=None):
if visited is None:
visited = []
if module_name in visited:
return visited + [module_name]
# Add logic to check dependencies
Best Practices
- Never Break Chains - Upgrade dependencies before dependents
- Test in Isolation - Use test databases for each module
- Document Changes - Note any dependency modifications
- Version Lock - Pin third-party module versions
- Backup First - Always backup before dependency changes
Common Issues
Missing Dependencies
- Error: "Module X depends on module Y"
- Solution: Install Y first, then X
Version Conflicts
- Error: "Module requires Odoo >=14.0"
- Solution: Find compatible version or update code
Removed Core Modules
- Error: "Module depends on removed module"
- Solution: Refactor to use v18 alternatives
Migration Order
Based on dependencies, migrate in this order: 1. Foundation modules (no dependencies) 2. Infrastructure modules (queue, component) 3. Core business modules (account, stock) 4. POS ecosystem 5. Integration modules 6. UI/Theme modules (can be done last)