[FIX][module_auto_update] Always store changes in lower graphs - #953
Conversation
The same problem that was fixed for the `base` addon in OCA#948 happened with random addons that do not depend on `module_auto_update` (a.k.a. any addon) that Odoo decided to load before that one in the graph. Now we always check for all addons if their state has changed, and make sure to trigger the udpate mechanism that stores the right value in `installed_checksum_dir` field.
If you tried to uninstall the addon, you'd get a transaction lock that is now prevented by using autocommit cursor mode. If you installed and uninstalled the addon right away, you'd get a ProgrammingError saying that some columns exist no more. Checks are done now using `search_read`, which lets us limit the fields being fetched, and the environment is cleared to make sure nothing fails. Also we now guess if this own addon has been uninstalled and skip further logic if so, given it would hit broken triggers otherwise as it did before.
0757449 to
6af33fa
Compare
|
This addon was being hit by several other problems as explained in last commit. Quoting myself from there:
It should work as expected in every aspect now. |
b645684 to
8882dda
Compare
pedrobaeza
left a comment
There was a problem hiding this comment.
Tested in our own instance.
Syncing from upstream OCA/server-tools (15.0)
The same problem that was fixed for the
baseaddon in #948 happened with random addons that do not depend onmodule_auto_update(a.k.a. any addon) that Odoo decided to load before that one in the graph.Now we always check for all addons if their state has changed, and make sure to trigger the udpate mechanism that stores the right value in
installed_checksum_dirfield.@Tecnativa