{"action":"created","issue":{"url":"https://api.github.com/repos/OCA/server-tools/issues/1176","repository_url":"https://api.github.com/repos/OCA/server-tools","labels_url":"https://api.github.com/repos/OCA/server-tools/issues/1176/labels{/name}","comments_url":"https://api.github.com/repos/OCA/server-tools/issues/1176/comments","events_url":"https://api.github.com/repos/OCA/server-tools/issues/1176/events","html_url":"https://github.com/OCA/server-tools/pull/1176","id":301367262,"number":1176,"title":"[9.0] add module_checksum_upgrade and refactor module_auto_update","user":{"login":"sbidoul","id":692075,"avatar_url":"https://avatars2.githubusercontent.com/u/692075?v=4","gravatar_id":"","url":"https://api.github.com/users/sbidoul","html_url":"https://github.com/sbidoul","followers_url":"https://api.github.com/users/sbidoul/followers","following_url":"https://api.github.com/users/sbidoul/following{/other_user}","gists_url":"https://api.github.com/users/sbidoul/gists{/gist_id}","starred_url":"https://api.github.com/users/sbidoul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbidoul/subscriptions","organizations_url":"https://api.github.com/users/sbidoul/orgs","repos_url":"https://api.github.com/users/sbidoul/repos","events_url":"https://api.github.com/users/sbidoul/events{/privacy}","received_events_url":"https://api.github.com/users/sbidoul/received_events","type":"User","site_admin":false},"labels":[{"id":116644613,"url":"https://api.github.com/repos/OCA/server-tools/labels/needs%20review","name":"needs review","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":35,"created_at":"2018-03-01T11:16:52Z","updated_at":"2018-03-13T13:52:25Z","closed_at":null,"author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/OCA/server-tools/pulls/1176","html_url":"https://github.com/OCA/server-tools/pull/1176","diff_url":"https://github.com/OCA/server-tools/pull/1176.diff","patch_url":"https://github.com/OCA/server-tools/pull/1176.patch"},"body":"Following the very interesting conversation in #1151 I've had a deeper look into module_auto_update. The idea is indeed brilliant. However I came to the conclusion that `module_auto_update` is not adequate for our needs for the following reasons:\r\n\r\n* it does too many things automatically and is intrusive in the regular Odoo upgrade process\r\n* in v9, it goes into autocommit mode during the upgrade process\r\n* once installed, it cannot be uninstalled (tested in v9), due to a deadlock when removing the stored field on ir.module.module\r\n\r\nIn general by looking at the history of `module_auto_update`, we can see that it started with a simple and elegant idea, but the resulting implementation taking into account of the edge cases has become very complex and difficult to understand and looks fragile. I believe this comes from the fact that it tries to immediately update the installed hash whatever the mean of installing a module or running the upgrade. \r\n\r\nSo I came up with this new module `module_checksum_upgrade` that provides the basic scriptable building blocks (ie computing hashes, and saving them, and upgrading the changed modules only). \r\n\r\nThe approach is a little bit different from module_auto_update as it saves the checksums in a ir.config_parameter instead as a field on the module (this is necessary for the uninstall to work, at least in 9). \r\n\r\nWe intend to port this module from 8 to 11.\r\n\r\nIf there is interest, it is easy to adapt module_auto_update to depend on this new module, therefore fixing the uninstall issue in module_auto_update, and avoiding code duplication. I've a [commit](https://github.com/acsone/server-tools/commit/63b5fc961475a63eeb8033f6dd720cec081f05de) ready that does just that."},"comment":{"url":"https://api.github.com/repos/OCA/server-tools/issues/comments/372672126","html_url":"https://github.com/OCA/server-tools/pull/1176#issuecomment-372672126","issue_url":"https://api.github.com/repos/OCA/server-tools/issues/1176","id":372672126,"user":{"login":"Yajo","id":973709,"avatar_url":"https://avatars0.githubusercontent.com/u/973709?v=4","gravatar_id":"","url":"https://api.github.com/users/Yajo","html_url":"https://github.com/Yajo","followers_url":"https://api.github.com/users/Yajo/followers","following_url":"https://api.github.com/users/Yajo/following{/other_user}","gists_url":"https://api.github.com/users/Yajo/gists{/gist_id}","starred_url":"https://api.github.com/users/Yajo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yajo/subscriptions","organizations_url":"https://api.github.com/users/Yajo/orgs","repos_url":"https://api.github.com/users/Yajo/repos","events_url":"https://api.github.com/users/Yajo/events{/privacy}","received_events_url":"https://api.github.com/users/Yajo/received_events","type":"User","site_admin":false},"created_at":"2018-03-13T13:52:25Z","updated_at":"2018-03-13T13:52:25Z","author_association":"MEMBER","body":"Want me to do it?"}}
{"actor":{"display_login":"Yajo"}}