[16.0][BKP] server_environment: Preserve not env managed data - #287
Closed
yankinmax wants to merge 2 commits into
Closed
[16.0][BKP] server_environment: Preserve not env managed data#287yankinmax wants to merge 2 commits into
yankinmax wants to merge 2 commits into
Conversation
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.
yankinmax
commented
Aug 24, 2026
Comment on lines
+7
to
+9
| @openupgrade.migrate() | ||
| def migrate(env, version): | ||
| env["ir.mail_server"]._preserve_not_env_managed_data(["smtp_authentication"]) |
Contributor
Author
There was a problem hiding this comment.
Set 16.0.1.0.3 as next patch one release ahead of current
yankinmax
marked this pull request as draft
August 24, 2026 12:45
Contributor
Author
|
Close this PR in favor for merged: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of: