Conversation
| return {"db_name": self.env.cr.dbname} | ||
| running_env = ( | ||
| config.get("running_env") | ||
| or os.environ.get("RUNNING_ENV") |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Does https://github.com/OCA/server-env/tree/18.0/server_environment_ir_config_parameter#configuration do what you need ?
There was a problem hiding this comment.
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}
Allow developer to construct ribbon name by
running_env(from server_environment module)Reference: https://github.com/OCA/server-env/blob/894c98587156042a02b8d02646b7513f75642720/server_environment/server_env.py#L47-L61