Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
177 Переглядів

Hello, 


I am trying to upgrade from odoo17 to odoo18 on odoo.sh the upgrade is on the last stage awaiting a commit so it works the problem is that it is showing the following error

odoo.modules.loading: Some modules have inconsistent states, some dependencies may be missing: ['module-x', 'module-y'] "i used fake names for the modules".

the thing is both these modules are not part of the modules i added nor they exists in the original odoo addons i tried looking every possible reference of them using grep in the shell but there is no reference of them anyware except in the log entry and they dont exist in the custom code files. Is there a way to force the update to work despite this error?

Аватар
Відмінити
Найкраща відповідь

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

Аватар
Відмінити
Автор

Hi
Thanks for the reply adding dummy modules worked
but now the upgrade is always waiting for user commit if i exit upgrade mode the branch reverts back to odoo17 is this normal?

Related Posts Відповіді Переглядів Дія
0
серп. 23
1857
Why native test fails? Вирішено
2
черв. 20
7097
0
лист. 19
4772
2
лист. 19
3355
0
трав. 17
3615