Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
152 Visualizzazioni

Hello,


I am trying to upgrade from Odoo 17 to Odoo 18 on Odoo.sh. The upgrade is in the final stage, waiting for a commit to proceed. The problem is that I am seeing 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 issue is that neither of these modules is part of what I added, nor do they exist in the original Odoo addons. I searched for any references to them using grep in the shell, but I found no mention of them anywhere except in the log entry. They do not exist in the custom code files either. Is there a way to force the update to work despite this error?

Avatar
Abbandona

At that point the actual module names could be helpful. Also, in your production Odoo 17, can you find them in Apps (without the Apps filter). Could be that those modules in fact have been installed in the past and then got removed from your repository without actually uninstalling the modules first.

Risposta migliore

Hi,



The error appears because Odoo still contains old or missing module references in the database, even if those modules no longer exist in your code. During an upgrade, Odoo checks all installed modules and their dependencies, and if it finds modules that are missing or can’t be loaded, it marks them as inconsistent, stopping the process.


You cannot directly force the upgrade to continue, but you can fix it by cleaning up the database. The best way is to remove the invalid module entries from the ir_module_module table using SQL, for example:

DELETE FROM ir_module_module WHERE name IN ('module-x', 'module-y');


If these modules were once dependencies, you should also remove related records from the ir_model_data table:

DELETE FROM ir_model_data WHERE module IN ('module-x', 'module-y');

After that, restart Odoo or re-run the upgrade process, and it should complete normally.


Hope it helps

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
lug 20
3922
0
nov 24
1811
2
lug 25
1874
1
giu 25
1512
0
ott 24
1486