From 50582a6def72ccfd01b4c04680cc1f0db2c921ea Mon Sep 17 00:00:00 2001 From: Sergio Teruel Date: Fri, 10 Jan 2020 10:32:08 +0100 Subject: [PATCH] [MIG] base_external_dbsource_mssql: Migration to v13.0 --- base_external_dbsource_mssql/README.rst | 10 +++++----- base_external_dbsource_mssql/__manifest__.py | 2 +- .../demo/base_external_dbsource.xml | 6 ++++-- .../models/base_external_dbsource.py | 5 +---- .../static/description/index.html | 6 +++--- .../odoo/addons/base_external_dbsource_mssql | 1 + setup/base_external_dbsource_mssql/setup.py | 6 ++++++ 7 files changed, 21 insertions(+), 15 deletions(-) create mode 120000 setup/base_external_dbsource_mssql/odoo/addons/base_external_dbsource_mssql create mode 100644 setup/base_external_dbsource_mssql/setup.py diff --git a/base_external_dbsource_mssql/README.rst b/base_external_dbsource_mssql/README.rst index c4586fa0..b633360d 100644 --- a/base_external_dbsource_mssql/README.rst +++ b/base_external_dbsource_mssql/README.rst @@ -14,13 +14,13 @@ External Database Source - MSSQL :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html :alt: License: LGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--backend-lightgray.png?logo=github - :target: https://github.com/OCA/server-backend/tree/12.0/base_external_dbsource_mssql + :target: https://github.com/OCA/server-backend/tree/13.0/base_external_dbsource_mssql :alt: OCA/server-backend .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/server-backend-12-0/server-backend-12-0-base_external_dbsource_mssql + :target: https://translation.odoo-community.org/projects/server-backend-13-0/server-backend-13-0-base_external_dbsource_mssql :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/253/12.0 + :target: https://runbot.odoo-community.org/runbot/253/13.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -74,7 +74,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -110,6 +110,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/server-backend `_ project on GitHub. +This module is part of the `OCA/server-backend `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/base_external_dbsource_mssql/__manifest__.py b/base_external_dbsource_mssql/__manifest__.py index 1104d060..3b49ce4e 100644 --- a/base_external_dbsource_mssql/__manifest__.py +++ b/base_external_dbsource_mssql/__manifest__.py @@ -3,7 +3,7 @@ # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). { "name": "External Database Source - MSSQL", - "version": "12.0.1.0.0", + "version": "13.0.1.0.0", "category": "Tools", "author": "Daniel Reis, " "LasLabs, " "Odoo Community Association (OCA)", "website": "https://github.com/OCA/server-backend", diff --git a/base_external_dbsource_mssql/demo/base_external_dbsource.xml b/base_external_dbsource_mssql/demo/base_external_dbsource.xml index f30a392e..f008b838 100644 --- a/base_external_dbsource_mssql/demo/base_external_dbsource.xml +++ b/base_external_dbsource_mssql/demo/base_external_dbsource.xml @@ -1,8 +1,10 @@ - + MSSQL Demo - Server=myServerAddress;Database=myDataBase;User Id=myUsername; + Server=myServerAddress;Database=myDataBase;User Id=myUsername; password mssql diff --git a/base_external_dbsource_mssql/models/base_external_dbsource.py b/base_external_dbsource_mssql/models/base_external_dbsource.py index 180097f5..11332327 100644 --- a/base_external_dbsource_mssql/models/base_external_dbsource.py +++ b/base_external_dbsource_mssql/models/base_external_dbsource.py @@ -4,7 +4,7 @@ import logging -from odoo import api, models +from odoo import models _logger = logging.getLogger(__name__) @@ -32,14 +32,11 @@ class BaseExternalDbsource(models.Model): PWD_STRING_MSSQL = "Password=%s;" - @api.multi def connection_close_mssql(self, connection): return connection.close() - @api.multi def connection_open_mssql(self): return self._connection_open_sqlalchemy() - @api.multi def execute_mssql(self, sqlquery, sqlparams, metadata): return self._execute_sqlalchemy(sqlquery, sqlparams, metadata) diff --git a/base_external_dbsource_mssql/static/description/index.html b/base_external_dbsource_mssql/static/description/index.html index f44dae37..14b017db 100644 --- a/base_external_dbsource_mssql/static/description/index.html +++ b/base_external_dbsource_mssql/static/description/index.html @@ -367,7 +367,7 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: LGPL-3 OCA/server-backend Translate me on Weblate Try me on Runbot

+

Beta License: LGPL-3 OCA/server-backend Translate me on Weblate Try me on Runbot

This module extends base_external_dbsource, allowing you to connect to foreign MSSQL databases using SQLAlchemy.

Table of contents

@@ -426,7 +426,7 @@ Database Structure > Database sources.

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -462,7 +462,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

-

This module is part of the OCA/server-backend project on GitHub.

+

This module is part of the OCA/server-backend project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/setup/base_external_dbsource_mssql/odoo/addons/base_external_dbsource_mssql b/setup/base_external_dbsource_mssql/odoo/addons/base_external_dbsource_mssql new file mode 120000 index 00000000..9a9b864e --- /dev/null +++ b/setup/base_external_dbsource_mssql/odoo/addons/base_external_dbsource_mssql @@ -0,0 +1 @@ +../../../../base_external_dbsource_mssql \ No newline at end of file diff --git a/setup/base_external_dbsource_mssql/setup.py b/setup/base_external_dbsource_mssql/setup.py new file mode 100644 index 00000000..28c57bb6 --- /dev/null +++ b/setup/base_external_dbsource_mssql/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)