[16.0][MIG]base_external_dbsource_mssql

This commit is contained in:
Andrea Cattalani
2023-03-31 10:06:47 +02:00
parent da8414b690
commit 5d5201a2e8
7 changed files with 17 additions and 9 deletions

View File

@@ -3,13 +3,14 @@
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
{ {
"name": "External Database Source - MSSQL", "name": "External Database Source - MSSQL",
"version": "15.0.1.0.0", "version": "16.0.1.0.0",
"category": "Tools", "category": "Tools",
"author": "Daniel Reis, " "LasLabs, " "Odoo Community Association (OCA)", "author": "Daniel Reis, " "LasLabs, " "Odoo Community Association (OCA)",
"maintainers": ["anddago78"],
"website": "https://github.com/OCA/server-backend", "website": "https://github.com/OCA/server-backend",
"license": "LGPL-3", "license": "LGPL-3",
"depends": ["base_external_dbsource_sqlite"], "depends": ["base_external_dbsource_sqlite"],
"external_dependencies": {"python": ["pymssql<=2.2.5"]}, "external_dependencies": {"python": ["pymssql<=2.2.5", "sqlalchemy"]},
"demo": ["demo/base_external_dbsource.xml"], "demo": ["demo/base_external_dbsource.xml"],
"installable": True, "installable": True,
} }

View File

@@ -4,12 +4,7 @@
import pymssql import pymssql
from odoo import models from odoo import fields, models
from odoo.addons.base_external_dbsource.models import base_external_dbsource
CONNECTORS = base_external_dbsource.BaseExternalDbsource.CONNECTORS
CONNECTORS.append(("mssql", "Microsoft SQL Server"))
assert pymssql assert pymssql
@@ -19,6 +14,9 @@ class BaseExternalDbsource(models.Model):
_inherit = "base.external.dbsource" _inherit = "base.external.dbsource"
connector = fields.Selection(
selection_add=[("mssql", "Microsoft SQL Server")], ondelete={"mssql": "cascade"}
)
PWD_STRING_MSSQL = "Password=%s;" PWD_STRING_MSSQL = "Password=%s;"
def connection_close_mssql(self, connection): def connection_close_mssql(self, connection):

View File

@@ -4,3 +4,4 @@
* Dave Lasley <dave@laslabs.com> * Dave Lasley <dave@laslabs.com>
* `Tecnativa <https://www.tecnativa.com>`_: * `Tecnativa <https://www.tecnativa.com>`_:
* Sergio Teruel * Sergio Teruel
* Andrea Cattalani (`Moduon <https://www.moduon.team/>`__)

View File

@@ -1,6 +1,6 @@
# Copyright 2016 LasLabs Inc. # Copyright 2016 LasLabs Inc.
import mock from unittest import mock
from odoo.tests import common from odoo.tests import common

View File

@@ -1,2 +1,3 @@
# generated from manifests external_dependencies # generated from manifests external_dependencies
pymssql<=2.2.5
sqlalchemy sqlalchemy

View File

@@ -0,0 +1 @@
../../../../base_external_dbsource_mssql

View File

@@ -0,0 +1,6 @@
import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)