mirror of
https://github.com/camptocamp/odoo-cloud-platform.git
synced 2026-06-24 08:47:40 +00:00
fix: add missing function get_running_env (#354)
This commit is contained in:
co-authored by
GitHub
parent
61a7d392ff
commit
61aadafabf
@@ -10,6 +10,7 @@ from collections import namedtuple
|
||||
from distutils.util import strtobool
|
||||
|
||||
from openerp import api, models, SUPERUSER_ID
|
||||
from openerp.tools.config import config
|
||||
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
@@ -79,6 +80,14 @@ class CloudPlatform(models.AbstractModel):
|
||||
def install_exoscale(self):
|
||||
self.install('exoscale')
|
||||
|
||||
def _get_running_env(self):
|
||||
environment_name = config['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.
|
||||
environment_name = 'labs'
|
||||
return environment_name
|
||||
|
||||
@api.model
|
||||
def _install(self, platform_kind):
|
||||
assert platform_kind in self._platform_kinds()
|
||||
|
||||
Reference in New Issue
Block a user