[IMP] base_external_dbsource: pre-commit auto fixes

This commit is contained in:
Anxo82
2024-06-05 13:50:00 +02:00
committed by Ángel Rivas
parent 9a70b9cc40
commit 8893d9c815
14 changed files with 89 additions and 84 deletions

View File

@@ -17,19 +17,19 @@ External Database Sources
: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/16.0/base_external_dbsource
:target: https://github.com/OCA/server-backend/tree/17.0/base_external_dbsource
: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-16-0/server-backend-16-0-base_external_dbsource
:target: https://translation.odoo-community.org/projects/server-backend-17-0/server-backend-17-0-base_external_dbsource
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-backend&target_branch=16.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-backend&target_branch=17.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
This module allows you to define connections to foreign databases using ODBC,
Firebird, Oracle Client or SQLAlchemy.
This module allows you to define connections to foreign databases using
ODBC, Firebird, Oracle Client or SQLAlchemy.
**Table of contents**
@@ -46,31 +46,32 @@ Configuration
To configure this module, you need to:
#. Database sources can be configured in Settings > Technical >
Database Structure > Data sources.
1. Database sources can be configured in Settings > Technical > Database
Structure > Data sources.
Usage
=====
* Go to Settings > Technical > Database Structure > Database Sources
* Click on Create to enter the following information:
* Data source name 
* Password
* Connector: Choose the database to which you want to connect
* Connection string: Specify how to connect to database
- Go to Settings > Technical > Database Structure > Database Sources
- Click on Create to enter the following information:
- Data source name 
- Password
- Connector: Choose the database to which you want to connect
- Connection string: Specify how to connect to database
Known issues / Roadmap
======================
* Find a way to remove or default the CA certs dir
* Add concept of multiple connection strings for one source (multiple nodes)
* Add a ConnectionEnvironment that allows for the reuse of connections
* Message box should be displayed instead of error in ``connection_test``
* Remove old api compatibility layers (v11)
* Instead of returning list of results, we should return iterators. This will
support larger datasets in a more efficient manner.
* Implement better CRUD handling
- Find a way to remove or default the CA certs dir
- Add concept of multiple connection strings for one source (multiple
nodes)
- Add a ConnectionEnvironment that allows for the reuse of connections
- Message box should be displayed instead of error in
``connection_test``
- Remove old api compatibility layers (v11)
- Instead of returning list of results, we should return iterators.
This will support larger datasets in a more efficient manner.
- Implement better CRUD handling
Bug Tracker
===========
@@ -78,7 +79,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-backend/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/server-backend/issues/new?body=module:%20base_external_dbsource%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/server-backend/issues/new?body=module:%20base_external_dbsource%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.
@@ -86,27 +87,26 @@ Credits
=======
Authors
~~~~~~~
-------
* Daniel Reis
* LasLabs
Contributors
~~~~~~~~~~~~
------------
* Daniel Reis <dreis.pt@hotmail.com>
* Maxime Chambreuil <maxime.chambreuil@savoirfairelinux.com>
* Gervais Naoussi <gervaisnaoussi@gmail.com>
* Dave Lasley <dave@laslabs.com>
- Daniel Reis <dreis.pt@hotmail.com>
- Maxime Chambreuil <maxime.chambreuil@savoirfairelinux.com>
- Gervais Naoussi <gervaisnaoussi@gmail.com>
- Dave Lasley <dave@laslabs.com>
- `Tecnativa <https://www.tecnativa.com>`__:
* `Tecnativa <https://www.tecnativa.com>`_:
* Sergio Teruel
* Jairo Llopis
* Andrea Cattalani (`Moduon <https://www.moduon.team/>`__)
- Sergio Teruel
- Jairo Llopis
- Andrea Cattalani (`Moduon <https://www.moduon.team/>`__)
Maintainers
~~~~~~~~~~~
-----------
This module is maintained by the OCA.
@@ -118,6 +118,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 <https://github.com/OCA/server-backend/tree/16.0/base_external_dbsource>`_ project on GitHub.
This module is part of the `OCA/server-backend <https://github.com/OCA/server-backend/tree/17.0/base_external_dbsource>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@@ -322,7 +322,7 @@ class BaseExternalDbsource(models.Model):
"""
self.ensure_one()
method = "{}_{}".format(method_prefix, self.connector)
method = f"{method_prefix}_{self.connector}"
try:
return getattr(self, method)

View File

@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"

View File

@@ -0,0 +1,4 @@
To configure this module, you need to:
1. Database sources can be configured in Settings \> Technical \>
Database Structure \> Data sources.

View File

@@ -1,4 +0,0 @@
To configure this module, you need to:
#. Database sources can be configured in Settings > Technical >
Database Structure > Data sources.

View File

@@ -0,0 +1,8 @@
- Daniel Reis \<<dreis.pt@hotmail.com>\>
- Maxime Chambreuil \<<maxime.chambreuil@savoirfairelinux.com>\>
- Gervais Naoussi \<<gervaisnaoussi@gmail.com>\>
- Dave Lasley \<<dave@laslabs.com>\>
- [Tecnativa](https://www.tecnativa.com):
- Sergio Teruel
- Jairo Llopis
- Andrea Cattalani ([Moduon](https://www.moduon.team/))

View File

@@ -1,10 +0,0 @@
* Daniel Reis <dreis.pt@hotmail.com>
* Maxime Chambreuil <maxime.chambreuil@savoirfairelinux.com>
* Gervais Naoussi <gervaisnaoussi@gmail.com>
* Dave Lasley <dave@laslabs.com>
* `Tecnativa <https://www.tecnativa.com>`_:
* Sergio Teruel
* Jairo Llopis
* Andrea Cattalani (`Moduon <https://www.moduon.team/>`__)

View File

@@ -1,2 +1,2 @@
This module allows you to define connections to foreign databases using ODBC,
Firebird, Oracle Client or SQLAlchemy.
This module allows you to define connections to foreign databases using
ODBC, Firebird, Oracle Client or SQLAlchemy.

View File

@@ -0,0 +1,9 @@
- Find a way to remove or default the CA certs dir
- Add concept of multiple connection strings for one source (multiple
nodes)
- Add a ConnectionEnvironment that allows for the reuse of connections
- Message box should be displayed instead of error in `connection_test`
- Remove old api compatibility layers (v11)
- Instead of returning list of results, we should return iterators. This
will support larger datasets in a more efficient manner.
- Implement better CRUD handling

View File

@@ -1,8 +0,0 @@
* Find a way to remove or default the CA certs dir
* Add concept of multiple connection strings for one source (multiple nodes)
* Add a ConnectionEnvironment that allows for the reuse of connections
* Message box should be displayed instead of error in ``connection_test``
* Remove old api compatibility layers (v11)
* Instead of returning list of results, we should return iterators. This will
support larger datasets in a more efficient manner.
* Implement better CRUD handling

View File

@@ -0,0 +1,6 @@
- Go to Settings \> Technical \> Database Structure \> Database Sources
- Click on Create to enter the following information:
- Data source name 
- Password
- Connector: Choose the database to which you want to connect
- Connection string: Specify how to connect to database

View File

@@ -1,7 +0,0 @@
* Go to Settings > Technical > Database Structure > Database Sources
* Click on Create to enter the following information:
* Data source name 
* Password
* Connector: Choose the database to which you want to connect
* Connection string: Specify how to connect to database

View File

@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
@@ -9,10 +8,11 @@
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
@@ -275,7 +275,7 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
pre.code .ln { color: grey; } /* line numbers */
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
@@ -301,7 +301,7 @@ span.option {
span.pre {
white-space: pre }
span.problematic {
span.problematic, pre.problematic {
color: red }
span.section-subtitle {
@@ -369,9 +369,9 @@ ul.auto-toc {
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:b6b6d53c12bad99b5a75536b07a9b3de684f59baadf1b10f4612f5f25640b26d
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-backend/tree/16.0/base_external_dbsource"><img alt="OCA/server-backend" src="https://img.shields.io/badge/github-OCA%2Fserver--backend-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-backend-16-0/server-backend-16-0-base_external_dbsource"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/server-backend&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module allows you to define connections to foreign databases using ODBC,
Firebird, Oracle Client or SQLAlchemy.</p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-backend/tree/17.0/base_external_dbsource"><img alt="OCA/server-backend" src="https://img.shields.io/badge/github-OCA%2Fserver--backend-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-backend-17-0/server-backend-17-0-base_external_dbsource"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/server-backend&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module allows you to define connections to foreign databases using
ODBC, Firebird, Oracle Client or SQLAlchemy.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
@@ -396,8 +396,8 @@ Firebird, Oracle Client or SQLAlchemy.</p>
<h1><a class="toc-backref" href="#toc-entry-2">Configuration</a></h1>
<p>To configure this module, you need to:</p>
<ol class="arabic simple">
<li>Database sources can be configured in Settings &gt; Technical &gt;
Database Structure &gt; Data sources.</li>
<li>Database sources can be configured in Settings &gt; Technical &gt; Database
Structure &gt; Data sources.</li>
</ol>
</div>
<div class="section" id="usage">
@@ -415,12 +415,14 @@ Database Structure &gt; Data sources.</li>
<h1><a class="toc-backref" href="#toc-entry-4">Known issues / Roadmap</a></h1>
<ul class="simple">
<li>Find a way to remove or default the CA certs dir</li>
<li>Add concept of multiple connection strings for one source (multiple nodes)</li>
<li>Add concept of multiple connection strings for one source (multiple
nodes)</li>
<li>Add a ConnectionEnvironment that allows for the reuse of connections</li>
<li>Message box should be displayed instead of error in <tt class="docutils literal">connection_test</tt></li>
<li>Message box should be displayed instead of error in
<tt class="docutils literal">connection_test</tt></li>
<li>Remove old api compatibility layers (v11)</li>
<li>Instead of returning list of results, we should return iterators. This will
support larger datasets in a more efficient manner.</li>
<li>Instead of returning list of results, we should return iterators.
This will support larger datasets in a more efficient manner.</li>
<li>Implement better CRUD handling</li>
</ul>
</div>
@@ -429,7 +431,7 @@ support larger datasets in a more efficient manner.</li>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-backend/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/server-backend/issues/new?body=module:%20base_external_dbsource%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/server-backend/issues/new?body=module:%20base_external_dbsource%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
@@ -459,11 +461,13 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-9">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<p>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.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-backend/tree/16.0/base_external_dbsource">OCA/server-backend</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-backend/tree/17.0/base_external_dbsource">OCA/server-backend</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>