Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMP] web_environment_ribbon: prepare running_env for ribbon name vals #3143

Open
wants to merge 1 commit into
base: 18.0
Choose a base branch
from

Conversation

kafai-lam
Copy link

return {"db_name": self.env.cr.dbname}
running_env = (
config.get("running_env")
or os.environ.get("RUNNING_ENV")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly because I'm curious is this list of environment variables supporting a specific odoo docker image or some kind of setup? Could we add DOODBA_ENVIRONMENT to this list?

And it seems that odoo does not support config.get("running_env") are you using a special Odoo Version to support this or am i missunderstanding the code?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

running_env is not a standard odoo config, it was added from the oca module server_environment. You can find the usage from this reference

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have also downloaded this module to configure the ribbon display like following

[ir.config_parameter]
ribbon.name={db_name}-staging

But I have to manually change the ribbon for every environment by myself
What I want to do is using single ribbon config for all environment(test/develop/staging/preproduction), like following

[ir.config_parameter]
ribbon.name={db_name}-{running_env}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants