Run pre-commit

This commit is contained in:
Florent Xicluna
2025-05-15 11:51:07 +02:00
parent 13f1c3149a
commit 06db90b42a
5 changed files with 10 additions and 17 deletions
+1 -2
View File
@@ -17,8 +17,7 @@ odoo_version: 18.0
org_name: Camptocamp org_name: Camptocamp
org_slug: camptocamp org_slug: camptocamp
rebel_module_groups: rebel_module_groups:
- attachment_azure,cloud_platform_azure repo_description: 'Tools to run Odoo on a cloud platform.'
repo_description: 'Tools to run Odoo on a cloud platform. Mainly Azure at the moment. '
repo_name: Odoo Cloud Addons repo_name: Odoo Cloud Addons
repo_slug: odoo-cloud-platform repo_slug: odoo-cloud-platform
repo_website: https://github.com/camptocamp/odoo-cloud-platform repo_website: https://github.com/camptocamp/odoo-cloud-platform
-9
View File
@@ -36,17 +36,8 @@ jobs:
matrix: matrix:
include: include:
- container: ghcr.io/oca/oca-ci/py3.10-odoo18.0:latest - container: ghcr.io/oca/oca-ci/py3.10-odoo18.0:latest
include: "attachment_azure,cloud_platform_azure"
name: test with Odoo name: test with Odoo
- container: ghcr.io/oca/oca-ci/py3.10-ocb18.0:latest - container: ghcr.io/oca/oca-ci/py3.10-ocb18.0:latest
include: "attachment_azure,cloud_platform_azure"
name: test with OCB
makepot: "false"
- container: ghcr.io/oca/oca-ci/py3.10-odoo18.0:latest
exclude: "attachment_azure,cloud_platform_azure"
name: test with Odoo
- container: ghcr.io/oca/oca-ci/py3.10-ocb18.0:latest
exclude: "attachment_azure,cloud_platform_azure"
name: test with OCB name: test with OCB
makepot: "false" makepot: "false"
services: services:
-1
View File
@@ -4,7 +4,6 @@
import logging import logging
import os import os
import re import re
from collections import namedtuple
from odoo import api, models from odoo import api, models
from odoo.tools.config import config from odoo.tools.config import config
-2
View File
@@ -1,6 +1,4 @@
# generated from manifests external_dependencies # generated from manifests external_dependencies
azure-identity
azure-storage-blob
prometheus_client prometheus_client
python-json-logger python-json-logger
redis redis
+9 -3
View File
@@ -44,6 +44,8 @@ anon_expiration = os.getenv("ODOO_SESSION_REDIS_EXPIRATION_ANONYMOUS")
ssl = os.getenv("ODOO_SESSION_REDIS_SSL", "1") ssl = os.getenv("ODOO_SESSION_REDIS_SSL", "1")
ssl_cert_reqs = os.getenv("ODOO_SESSION_REDIS_SSL_CERT_REQS", "1") ssl_cert_reqs = os.getenv("ODOO_SESSION_REDIS_SSL_CERT_REQS", "1")
redis_cluster = os.getenv("ODOO_SESSION_REDIS_CLUSTER", "0") redis_cluster = os.getenv("ODOO_SESSION_REDIS_CLUSTER", "0")
@lazy_property @lazy_property
def session_store(self): def session_store(self):
if sentinel_host: if sentinel_host:
@@ -57,12 +59,16 @@ def session_store(self):
port=port, port=port,
password=password, password=password,
ssl=is_true(ssl), ssl=is_true(ssl),
ssl_cert_reqs=is_true(ssl_cert_reqs)) ssl_cert_reqs=is_true(ssl_cert_reqs),
)
else: else:
redis_client = redis.Redis( redis_client = redis.Redis(
host=host, port=port, password=password, host=host,
port=port,
password=password,
ssl=is_true(ssl), ssl=is_true(ssl),
ssl_cert_reqs=is_true(ssl_cert_reqs)) ssl_cert_reqs=is_true(ssl_cert_reqs),
)
return RedisSessionStore( return RedisSessionStore(
redis=redis_client, redis=redis_client,
prefix=prefix, prefix=prefix,