[IMP] server_environment: module uninstallation - #276
Conversation
ivantodorovich
left a comment
There was a problem hiding this comment.
LG. Pre-commit is failing though :(
1409635 to
e6e163b
Compare
|
Hello @lmignon can you pls take a look at this PR and possibly trigger merge? |
|
/ocabot merge patch |
|
On my way to merge this fine PR! |
|
@lmignon The merge process could not be finalized, because command |
|
@lmignon what can I do to fix this issue? Do you have any idea? |
Generate the files locally to see the result a line 226 and try to resolve the format into the source document to avoid warnings. 🤔 |
|
I've added here two backport commits of the: This is needed to be able to add this PR as a dependency to another PR's without conflicts like this one: This conflict is happening, because in v16 we can't have two test dependencies pointing to the same module (from what I see). Once this PR is merged I'll close this one: |
af4348a to
567c760
Compare
|
|
||
|
|
||
| @openupgrade.migrate() | ||
| def migrate(env, version): |
There was a problem hiding this comment.
do you intend to run this on the next upgrade? The current version is 1.1.1 and this won't have any effect
There was a problem hiding this comment.
It's 16.0.1.0.2:
There was a problem hiding this comment.
sorry I've probably checked the wrong branch.
BTW next time you can bump the version manually and we can use nobump on merge. This way you have full control.
There was a problem hiding this comment.
I was asked several times on different PR's not to bump 😄
567c760 to
88e0488
Compare
Add a helper to manage the restoring of the database columns when a module using `server_environment` is uninstalled or the dependency on `server_environment` is dropped. Document how to use the helper in an uninstall script or in an upgrade script (if a new version of the addon drops the dependency).
Helper function typically used for hooks and migration scripts. Restores database values for fields transitioning to 'server env managed'. When a field is defined as managed by the server environment, Odoo ignores the value stored in the database, prioritizing the environment configuration instead. If no environment configuration exists, the field may effectively lose its previous value. This method forces to 'persist' these values if they are not explicitly overridden by the current environment configuration.
…cation" To preserve the value of field "smtp_authentication" if we don't set it from the environment. Which may happen to anyone updating the sources of mail_environment for its project.
88e0488 to
115290d
Compare
|
/ocabot merge patch |
|
What a great day to merge this nice PR. Let's do it! |
|
Congratulations, your PR was merged at e2d94da. Thanks a lot for contributing to OCA. ❤️ |
Add a helper to manage the restoring of the database columns when a module using
server_environmentis uninstalled or the dependency onserver_environmentis dropped.Document how to use the helper in an uninstall script or in an upgrade script (if a new version of the addon drops the dependency).
This is a backward port of #261