Skip to content

[19.0][FWP] server_environment: Preserve not env managed data - #288

Merged
OCA-git-bot merged 4 commits into
OCA:19.0from
camptocamp:19.0-fwp-server_env_preserve
Sep 8, 2026
Merged

[19.0][FWP] server_environment: Preserve not env managed data#288
OCA-git-bot merged 4 commits into
OCA:19.0from
camptocamp:19.0-fwp-server_env_preserve

Conversation

@yankinmax

@yankinmax yankinmax commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

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.
@OCA-git-bot OCA-git-bot added mod:server_environment Module server_environment mod:mail_environment Module mail_environment series:19.0 labels Aug 24, 2026
@yankinmax
yankinmax force-pushed the 19.0-fwp-server_env_preserve branch from 79b00df to 9fc049b Compare August 24, 2026 06:26
Comment thread mail_environment/migrations/19.0.1.1.1/post-migration.py
Comment thread mail_environment/__manifest__.py
…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
yankinmax force-pushed the 19.0-fwp-server_env_preserve branch from 9fc049b to c025687 Compare August 31, 2026 06:22
Preserve default values already stored in the DB.
@yankinmax

Copy link
Copy Markdown
Contributor Author

Hello @simahawk your commits are cherry-picked from the:

@yankinmax
yankinmax force-pushed the 19.0-fwp-server_env_preserve branch from da15709 to e9bab93 Compare September 7, 2026 15:05
@yankinmax
yankinmax force-pushed the 19.0-fwp-server_env_preserve branch from e9bab93 to 27d60b4 Compare September 7, 2026 15:09
@simahawk

simahawk commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

/ocabot merge nobump

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 19.0-ocabot-merge-pr-288-by-simahawk-bump-nobump, awaiting test results.

@OCA-git-bot
OCA-git-bot merged commit 9147fd8 into OCA:19.0 Sep 8, 2026
7 checks passed
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 120f3ea. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants