diff --git a/cloud_platform/__manifest__.py b/cloud_platform/__manifest__.py index eef9069d..6088dac8 100644 --- a/cloud_platform/__manifest__.py +++ b/cloud_platform/__manifest__.py @@ -9,13 +9,7 @@ "author": "Camptocamp,Odoo Community Association (OCA)", "license": "AGPL-3", "category": "Extra Tools", - "depends": [ - "session_redis", - "monitoring_status", - "logging_json", - "server_environment", # OCA/server-tools - ], + "depends": ["session_redis", "monitoring_status", "logging_json"], "website": "https://github.com/camptocamp/odoo-cloud-platform", - "data": [], "installable": False, } diff --git a/cloud_platform/models/cloud_platform.py b/cloud_platform/models/cloud_platform.py index 8385c1c9..51db8475 100644 --- a/cloud_platform/models/cloud_platform.py +++ b/cloud_platform/models/cloud_platform.py @@ -6,7 +6,6 @@ import re from odoo import api, models -from odoo.tools.config import config from .strtobool import strtobool @@ -22,7 +21,7 @@ class CloudPlatform(models.AbstractModel): _description = "cloud.platform" def _get_running_env(self): - environment_name = config["running_env"] + environment_name = os.environ.get("RUNNING_ENV") if environment_name.startswith("labs"): # We allow to have environments such as 'labs-logistics' # or 'labs-finance', in order to have the matching ribbon. diff --git a/monitoring_prometheus/__manifest__.py b/monitoring_prometheus/__manifest__.py index 95901a07..8d81ed18 100644 --- a/monitoring_prometheus/__manifest__.py +++ b/monitoring_prometheus/__manifest__.py @@ -7,14 +7,9 @@ "version": "18.0.1.0.0", "author": "Camptocamp,Odoo Community Association (OCA)", "license": "AGPL-3", - "category": "category", - "depends": [ - "base", - "web", - "server_environment", - ], + "category": "Extra Tools", + "depends": ["base", "web"], "website": "https://github.com/camptocamp/odoo-cloud-platform", - "data": [], "external_dependencies": { "python": ["prometheus_client"], }, diff --git a/monitoring_prometheus/models/ir_http.py b/monitoring_prometheus/models/ir_http.py index b2316c81..e615f6e7 100644 --- a/monitoring_prometheus/models/ir_http.py +++ b/monitoring_prometheus/models/ir_http.py @@ -17,6 +17,8 @@ class IrHttp(models.AbstractModel): @classmethod def _dispatch(cls, endpoint): + # httprequest environment is updated with WSGI environment variables in core + # REF: https://github.com/odoo/odoo/blob/19.0/odoo/http.py#L2120 path_info = request.httprequest.environ.get("PATH_INFO") if path_info.startswith("/longpolling/"):