Skip to content

[14.0] server_environment: allow setting running env through env#146

Merged
OCA-git-bot merged 1 commit into
OCA:14.0from
petrus-v:14.0-allow-to-set-running-env-through-environment-variable
Sep 12, 2023
Merged

[14.0] server_environment: allow setting running env through env#146
OCA-git-bot merged 1 commit into
OCA:14.0from
petrus-v:14.0-allow-to-set-running-env-through-environment-variable

Conversation

@petrus-v

@petrus-v petrus-v commented Mar 7, 2023

Copy link
Copy Markdown
Contributor

This also give a chance to use server enivornment on odoo.sh !

@petrus-v petrus-v force-pushed the 14.0-allow-to-set-running-env-through-environment-variable branch from 4870cd1 to 5671e7c Compare March 8, 2023 08:34
Comment thread server_environment/server_env.py Outdated
@petrus-v petrus-v changed the title [IMP] server_environment: allow setting running env through environme… [IMP] server_environment: allow setting running env through env Jun 9, 2023
@petrus-v petrus-v force-pushed the 14.0-allow-to-set-running-env-through-environment-variable branch from a33faf0 to 0061c61 Compare June 9, 2023 14:47
@petrus-v petrus-v changed the title [IMP] server_environment: allow setting running env through env [14.0] server_environment: allow setting running env through env Jun 16, 2023
@damdam-s

damdam-s commented Sep 6, 2023

Copy link
Copy Markdown
Member

@grindtildeath are you OK with the last changes? thanks

@simahawk

simahawk commented Sep 7, 2023

Copy link
Copy Markdown
Contributor

@petrus-v could you please shorten commit msgs?

[IMP] server_environment: allow env variable conf should be enough

@petrus-v petrus-v force-pushed the 14.0-allow-to-set-running-env-through-environment-variable branch from 0061c61 to 4286429 Compare September 7, 2023 10:31
@petrus-v

petrus-v commented Sep 7, 2023

Copy link
Copy Markdown
Contributor Author

@simahawk I've sqashed, rebased and reword the final commit

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@simahawk

Copy link
Copy Markdown
Contributor

/ocabot merge minor

@OCA-git-bot

Copy link
Copy Markdown
Contributor

On my way to merge this fine PR!
Prepared branch 14.0-ocabot-merge-pr-146-by-simahawk-bump-minor, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit c0b43a4 into OCA:14.0 Sep 12, 2023
@OCA-git-bot

Copy link
Copy Markdown
Contributor

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

ivantodorovich added a commit to camptocamp/docker-odoo-project that referenced this pull request Jun 30, 2026
Originally, this was the only way to configure the running environment for the
server_environment module.

3 years ago, a PR improved the module in version 14.0, to read the running
environment from the environment variable `RUNNING_ENV` instead of the config
file, if set.

Original PR in 14.0:
- OCA/server-env#146

Later, this PR was forward ported to 16.0 and 17.0 (sadly no 15.0):
- 15.0: NOT PORTED
- 16.0: OCA/server-env#223
- 17.0: OCA/server-env#189

Finally, it was fully integrated into the migrations to 18.0 and 19.0.
So it's safe to assume that in 18.0 and 19.0, no matter the module version used,
the running environment will be read from the RUNNING_ENV variable.

---

In 19.0, Odoo started complaining about unknown config file options, so this
supresses the following warning:

```
WARNING ? odoo.tools.config: unknown option 'running_env' in the config file at
/etc/odoo.cfg, option stored as-is, without parsing
```
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.

6 participants