[REF] cloud_platform: server_environment should not be a required dependency

This commit is contained in:
Maksym Yankin
2026-05-20 09:53:30 -03:00
committed by Iván Todorovich
co-authored by Iván Todorovich
parent 083417f583
commit b86a32f8d5
2 changed files with 3 additions and 10 deletions
+2 -8
View File
@@ -5,17 +5,11 @@
{ {
"name": "Cloud Platform", "name": "Cloud Platform",
"summary": "Addons required for the Camptocamp Cloud Platform", "summary": "Addons required for the Camptocamp Cloud Platform",
"version": "16.0.2.0.0", "version": "16.0.2.0.1",
"author": "Camptocamp,Odoo Community Association (OCA)", "author": "Camptocamp,Odoo Community Association (OCA)",
"license": "AGPL-3", "license": "AGPL-3",
"category": "Extra Tools", "category": "Extra Tools",
"depends": [ "depends": ["session_redis", "monitoring_status", "logging_json"],
"session_redis",
"monitoring_status",
"logging_json",
"server_environment", # OCA/server-tools
],
"website": "https://github.com/camptocamp/odoo-cloud-platform", "website": "https://github.com/camptocamp/odoo-cloud-platform",
"data": [],
"installable": True, "installable": True,
} }
+1 -2
View File
@@ -7,7 +7,6 @@ import re
from collections import namedtuple from collections import namedtuple
from odoo import api, models from odoo import api, models
from odoo.tools.config import config
from .strtobool import strtobool from .strtobool import strtobool
@@ -52,7 +51,7 @@ class CloudPlatform(models.AbstractModel):
return configs.get(environment) or self._default_config() return configs.get(environment) or self._default_config()
def _get_running_env(self): def _get_running_env(self):
environment_name = config["running_env"] environment_name = os.environ.get("RUNNING_ENV")
if environment_name.startswith("labs"): if environment_name.startswith("labs"):
# We allow to have environments such as 'labs-logistics' # We allow to have environments such as 'labs-logistics'
# or 'labs-finance', in order to have the matching ribbon. # or 'labs-finance', in order to have the matching ribbon.