Skip to content

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:

base → cnf_model_customizeations → cnf_account_loc_costcenters

2. Queue Job Infrastructure

Critical for async processing:

queue_job → cnf_queue_job → [multiple modules depend on this]

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:

component → component_event → connector → connector_cnf_product_catalog
                                        ↘ connector_cnf_inventory

Critical Dependencies

Most Depended Upon Modules

  1. cnf_account_loc_costcenters (18 dependencies)
  2. Core to accounting and location management
  3. Required by POS, inventory, and accounting modules

  4. cnf_queue_job (15 dependencies)

  5. Async job processing infrastructure
  6. Critical for performance-intensive operations

  7. pos_utils (10 dependencies)

  8. Foundation for all POS functionality
  9. Cannot be removed without breaking POS

  10. cnf_model_customizeations (8 dependencies)

  11. Base model modifications
  12. 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)

  1. base modules
  2. muk_utils
  3. product standalone modules
  4. web_tree_decoration_indent

Phase 2: Infrastructure (Few Dependencies)

  1. queue_job and cnf_queue_job
  2. component framework
  3. cnf_model_customizeations
  4. cnf_account_loc_costcenters

Phase 3: Business Logic (Many Dependencies)

  1. POS module chain
  2. Inventory management chain
  3. Accounting extensions
  4. Purchase workflow

Phase 4: Integration & UI

  1. Connector modules
  2. Theme and website modules
  3. API interfaces

Handling Third-Party Dependencies

VentorTech Modules

  • Start with merp_base and ventor_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

  1. Never Break Chains - Upgrade dependencies before dependents
  2. Test in Isolation - Use test databases for each module
  3. Document Changes - Note any dependency modifications
  4. Version Lock - Pin third-party module versions
  5. 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)