Odoo upgrade error
Odoo is currently processing another module operation
Last updated: October 2026
Odoo refuses to install, upgrade or uninstall anything because at least one module is stuck in a pending state. Common right after an upgrade to Odoo 19.
This page is part of our guide on how to upgrade Odoo Community Edition. It explains what triggers the error, how to fix it by hand, and what an automated migration does about it.
The error
Invalid Operation
Odoo is currently processing another module operation.
Please try again later or contact your system administrator.Odoo 15 to 18 show a related message when the scheduled-action table is locked: "Odoo is currently processing a scheduled action. Module operations are not possible at this time, please try again later or contact your system administrator." That one has a different cause, covered below.
- Raised by
ir.module.module._button_immediate_function(Odoo 19)- Shown when
- You click Install, Upgrade or Uninstall in the Apps menu
- Typical timing
- First days after an upgrade, or after an install that was interrupted
When you see it
In Odoo 19 every button that installs, upgrades or uninstalls a module first runs a check. If any row in ir_module_module has the state to install, to upgrade or to remove, Odoo assumes another module operation is still running and stops with the message above. Odoo 19 raises the same message when it cannot lock the ir_module_module table within 3 seconds, which means another transaction really is working on modules at that moment.
Odoo 18 and earlier do not have this check. A stuck state there does not block the Apps buttons; instead the pending modules are processed together with whatever you install next, which can fail in confusing ways. That is why the message appears so often right after people move to Odoo 19: the states were already stuck in the older database, and Odoo 19 is the first version that refuses to continue.
Root cause
The three pending states are meant to last only for the few seconds between clicking a button and the registry reload that applies the change. They stay behind when that reload never completes:
- An install or upgrade crashed half-way (a traceback during module loading, a worker killed by
limit_time_real, a server restart). - Someone clicked Upgrade on a module whose code was not deployed yet, so the module was marked
to upgradebut never processed. - A migration script or tool left modules in
to upgradeon purpose so they would update on the next start, and that start never ran with-u. - The database was dumped while an operation was in progress and later restored.
If the message mentions a lock rather than a pending state, check pg_stat_activity for a long-running transaction: a scheduled action or a second administrator can hold the table.
How to fix it
Option 1: Reset Updating States (Odoo 19)
Odoo 19 ships a reset for exactly this case. Open Apps as an administrator, click the gear icon next to the view title and choose Reset Updating States. The entry is only shown while at least one module is in a pending state. It sets to install back to uninstalled and to upgrade / to remove back to installed, then reloads the page.
Option 2: the same reset in SQL
Use this on Odoo 15 to 18, or when you cannot reach the web client. First see what is pending:
SELECT name, state
FROM ir_module_module
WHERE state IN ('to install', 'to upgrade', 'to remove')
ORDER BY state, name;Before you change anything: Back up the database before running any UPDATE or INSERT below, and try it on a copy first. These statements change data directly, outside the Odoo ORM.
Then cancel the pending operations, using the same mapping Odoo 19 uses:
UPDATE ir_module_module SET state = 'uninstalled' WHERE state = 'to install';
UPDATE ir_module_module SET state = 'installed' WHERE state IN ('to upgrade', 'to remove');Restart the Odoo service afterwards so every worker reloads the registry.
Option 3: finish the operation instead of cancelling it
A reset cancels the pending work. If a module is to upgrade because you deployed new code for it, run the update instead: odoo -d yourdb -u module_name --stop-after-init. If that update fails, the traceback it prints is the real problem to fix; resetting the state only hides it until the next attempt.
How OCU handles it
After the upgrade step, the OCU runner looks for standard modules still in to upgrade, to install or to remove and sets them to installed, so the database you download does not start with this error.
Third-party modules whose code is not part of the target version are switched off during the upgrade. When the run ends they are set back to installed, not to upgrade, precisely so the Apps menu is not blocked. Update them with -u once you deploy versions compatible with the new release.
A free test migration shows whether your database runs into this or any other upgrade error before you change anything on your production server.
Frequently asked questions
- Is it safe to reset the module states?
- Yes, when no operation is actually running. The reset only cancels pending install, upgrade and uninstall requests; it does not touch module data. If a module was pending an upgrade because you deployed new code, run that upgrade with -u afterwards.
- Why do I only see this after upgrading to Odoo 19?
- Odoo 19 added the check that raises this message. Odoo 18 and earlier let you click Install even with modules stuck in a pending state, so a stuck state could sit unnoticed in the database for a long time and only surface once you reach Odoo 19.
- Does this error mean my upgrade failed?
- Not necessarily. The data may be fully migrated while a few module rows still carry a pending state. Check the list with the SELECT query on this page, then reset or finish those operations.
- Where is the Reset Updating States option?
- In Odoo 19, open Apps as an administrator and click the gear icon next to the view title. The option is only displayed while at least one module is in to install, to upgrade or to remove.
Related
Find upgrade errors before your production run
Upload a backup and run a free test migration. You get the upgraded database, the full log and every warning, with no change to your live system.
Start your free test migration