[19.0][FWP] server_environment: Preserve not env managed data - #288
Open
yankinmax wants to merge 2 commits into
Open
[19.0][FWP] server_environment: Preserve not env managed data#288yankinmax 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
force-pushed
the
19.0-fwp-server_env_preserve
branch
from
August 24, 2026 06:26
79b00df to
9fc049b
Compare
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 19.0.1.1.1 as next patch one release ahead of current.
yankinmax
commented
Aug 24, 2026
| { | ||
| "name": "Mail configuration with server_environment", | ||
| "version": "19.0.1.1.0", | ||
| "version": "19.0.1.1.1", |
Contributor
Author
There was a problem hiding this comment.
pre-commit argues if manifest version is not changed
2 tasks
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.
Forward-port of: