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
+7
View File
@@ -0,0 +1,7 @@
Cloud Platform OVH
==================
Install addons specific to the OVH setup.
* The object storage is Swift
+1
View File
@@ -0,0 +1 @@
from . import models
+19
View File
@@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
{'name': 'Cloud Platform OVH',
'summary': 'Addons required for the Camptocamp Cloud Platform on OVH',
'version': '10.0.1.1.0',
'author': 'Camptocamp,Odoo Community Association (OCA)',
'license': 'AGPL-3',
'category': 'Extra Tools',
'depends': [
'cloud_platform',
'attachment_swift',
],
'website': 'https://www.camptocamp.com',
'data': [],
'installable': True,
}
+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')