Skip to content

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

Open
kafai-lam wants to merge 1 commit intoOCA:18.0from
kafai-lam:18-imp-web_environment_ribbon-prepare-running_env-for-ribbon-name-vals
Open

[IMP] web_environment_ribbon: prepare running_env for ribbon name vals#3143
kafai-lam wants to merge 1 commit intoOCA:18.0from
kafai-lam:18-imp-web_environment_ribbon-prepare-running_env-for-ribbon-name-vals

Conversation

@kafai-lam
Copy link
Copy Markdown
Contributor

return {"db_name": self.env.cr.dbname}
running_env = (
config.get("running_env")
or os.environ.get("RUNNING_ENV")
Copy link
Copy Markdown
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
Copy Markdown
Contributor 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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor 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