Hi,
The error occurs because Odoo still detects modules in the database (ir_module_module) that are marked as installed or present, even though they no longer exist in your code. These leftover references can happen if a module was removed without proper uninstallation, or if branches or upgrades changed the addons path. Odoo reads these database records before the upgrade, which is why it reports missing dependencies even though the code doesn’t contain them.
Searching your codebase with grep won’t help because the problem resides in the database metadata, not the files. Tables like ir_module_module, ir_module_module_dependency, and ir_model_data store module states, dependencies, and module-specific data. Missing modules in these tables can block upgrades.
The recommended solution is to mark the missing modules as uninstalled directly in the database, for example by updating ir_module_module or removing leftover dependency and data entries. Alternatively, you could temporarily add dummy modules with the same names to satisfy Odoo and then uninstall them properly. After these steps, running an update (-u all) will allow the upgrade to proceed.
Direct SQL manipulation should be done carefully with a backup, as it ensures database integrity and prevents upgrade failures. Once the database no longer references the missing modules, the upgrade to Odoo 18 should complete successfully.
Hope it helps