Skip to content
Snippets Groups Projects
Commit 63e83183 authored by Xavier Morel's avatar Xavier Morel
Browse files

[FIX] core: flush after every uninstall hook

Confusion between uninstall hooks can apparently trigger errors during
uninstallation as two hooks can confuse one another?

In this here case, the issue triggered during the uninstall hook of
`account_accountant`, which apparently combines with the uninstall
hook of `industry_fsm_sale` to trigger an invalid in-memory state for
`project_project`. An implicit flush during the hook then blows up
with a check constraint error.

Flushing at the end of the `industry_fsm_sale` hook or at the start of
the `account_accountant` hook fixes the issue, so might as well flush
after each hook to ensure whatever they did using models is pushed to
the database and in good shape (hopefully).

Part-of: odoo/odoo#119606
parent 3685a823
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment