Get OVH modules from 10.0

This commit is contained in:
jcoux
2018-10-29 11:10:49 +01:00
parent 8bd5049b7d
commit c6a0e7c1f5
19 changed files with 734 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
from . import cloud_platform
@@ -0,0 +1,41 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
import logging
from odoo import api, models
_logger = logging.getLogger(__name__)
try:
from odoo.addons.cloud_platform.models.cloud_platform import FilestoreKind
from odoo.addons.cloud_platform.models.cloud_platform import PlatformConfig
except ImportError:
FilestoreKind = None
PlatformConfig = None
_logger.debug("Cannot 'import from cloud_platform'")
class CloudPlatform(models.AbstractModel):
_inherit = 'cloud.platform'
@api.model
def _platform_kinds(self):
kinds = super(CloudPlatform, self)._platform_kinds()
kinds.append('ovh')
return kinds
@api.model
def _config_by_server_env_for_ovh(self):
configs = {
'prod': PlatformConfig(filestore=FilestoreKind.swift),
'integration': PlatformConfig(filestore=FilestoreKind.swift),
'test': PlatformConfig(filestore=FilestoreKind.db),
'dev': PlatformConfig(filestore=FilestoreKind.db),
}
return configs
@api.model
def install_ovh(self):
self.install('ovh')