From 08ef2f8025752d92a4fd139f92fe263c0e87d826 Mon Sep 17 00:00:00 2001 From: Maksym Yankin Date: Tue, 31 Mar 2026 09:07:45 +0300 Subject: [PATCH] [REF] cloud_platform: server_environment should not be a required dependency --- .pre-commit-config.yaml | 1 - cloud_platform/__manifest__.py | 8 +------- cloud_platform/models/cloud_platform.py | 3 +-- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6af0440..38a974e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,6 @@ exclude: | (?x) # NOT INSTALLABLE ADDONS ^base_fileurl_field/| - ^cloud_platform/| ^monitoring_log_requests/| ^monitoring_prometheus/| ^monitoring_statsd/| diff --git a/cloud_platform/__manifest__.py b/cloud_platform/__manifest__.py index eef9069..6088dac 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 8385c1c..51db847 100644 --- a/cloud_platform/models/cloud_platform.py +++ b/cloud_platform/models/cloud_platform.py @@ -6,7 +6,6 @@ import os 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.