[IMP] intrastat_base: pre-commit auto fixes

This commit is contained in:
Alexis de Lattre
2023-12-29 12:50:23 +01:00
parent e364200928
commit c520a83848
12 changed files with 69 additions and 60 deletions

View File

@@ -17,13 +17,13 @@ Intrastat Reporting Base
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3 :alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fintrastat--extrastat-lightgray.png?logo=github .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fintrastat--extrastat-lightgray.png?logo=github
:target: https://github.com/OCA/intrastat-extrastat/tree/16.0/intrastat_base :target: https://github.com/OCA/intrastat-extrastat/tree/17.0/intrastat_base
:alt: OCA/intrastat-extrastat :alt: OCA/intrastat-extrastat
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/intrastat-extrastat-16-0/intrastat-extrastat-16-0-intrastat_base :target: https://translation.odoo-community.org/projects/intrastat-extrastat-17-0/intrastat-extrastat-17-0-intrastat_base
:alt: Translate me on Weblate :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/intrastat-extrastat&target_branch=16.0 :target: https://runboat.odoo-community.org/builds?repo=OCA/intrastat-extrastat&target_branch=17.0
:alt: Try me on Runboat :alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5| |badge1| |badge2| |badge3| |badge4| |badge5|
@@ -33,12 +33,12 @@ should be used in combination with the generic reporting module
*intrastat_product* and with the country-specific reporting modules such *intrastat_product* and with the country-specific reporting modules such
as: as:
- *l10n_fr_intrastat_service*: - *l10n_fr_intrastat_service*: the module for the *Déclaration
the module for the *Déclaration Européenne des Services* (DES) for France Européenne des Services* (DES) for France
- *l10n_fr_intrastat_product*: - *l10n_fr_intrastat_product*: the module for the *Déclaration
the module for the *Déclaration d'Echange de Biens* (DEB) for France d'Echange de Biens* (DEB) for France
- *l10n_be_intrastat_product*: - *l10n_be_intrastat_product*: the module for the Intrastat Declaration
the module for the Intrastat Declaration for Belgium. for Belgium.
**Table of contents** **Table of contents**
@@ -50,16 +50,18 @@ Installation
WARNING: WARNING:
This module conflicts with the module *account_intrastat* from Odoo Enterprise. This module conflicts with the module *account_intrastat* from Odoo
If you have already installed the module *account_intrastat*, Enterprise. If you have already installed the module
you should uninstall it first before installing this module. *account_intrastat*, you should uninstall it first before installing
this module.
Usage Usage
===== =====
This module adds an intrastat property on fiscal positions. This module adds an intrastat property on fiscal positions.
With this module, the country field on partners becomes a required field. With this module, the country field on partners becomes a required
field.
It adds an *Intrastat* section on the *Invoicing* configuration page. It adds an *Intrastat* section on the *Invoicing* configuration page.
@@ -69,7 +71,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/intrastat-extrastat/issues>`_. Bugs are tracked on `GitHub Issues <https://github.com/OCA/intrastat-extrastat/issues>`_.
In case of trouble, please check there if your issue has already been reported. 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 If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/intrastat-extrastat/issues/new?body=module:%20intrastat_base%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. `feedback <https://github.com/OCA/intrastat-extrastat/issues/new?body=module:%20intrastat_base%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. Do not contact contributors directly about support or help with technical issues.
@@ -77,23 +79,23 @@ Credits
======= =======
Authors Authors
~~~~~~~ -------
* ACSONE SA/NV * ACSONE SA/NV
* Akretion * Akretion
* Noviat * Noviat
Contributors Contributors
~~~~~~~~~~~~ ------------
* Alexis de Lattre, Akretion <alexis.delattre@akretion.com> - Alexis de Lattre, Akretion <alexis.delattre@akretion.com>
* Luc De Meyer, Noviat <info@noviat.com> - Luc De Meyer, Noviat <info@noviat.com>
* Kumar Aberer, brain-tec AG <kumar.aberer@braintec-group.com> - Kumar Aberer, brain-tec AG <kumar.aberer@braintec-group.com>
* Andrea Stirpe <a.stirpe@onestein.nl> - Andrea Stirpe <a.stirpe@onestein.nl>
* Denis Roussel <denis.roussel@acsone.eu> - Denis Roussel <denis.roussel@acsone.eu>
Maintainers Maintainers
~~~~~~~~~~~ -----------
This module is maintained by the OCA. This module is maintained by the OCA.
@@ -116,6 +118,6 @@ Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:
|maintainer-alexis-via| |maintainer-luc-demeyer| |maintainer-alexis-via| |maintainer-luc-demeyer|
This module is part of the `OCA/intrastat-extrastat <https://github.com/OCA/intrastat-extrastat/tree/16.0/intrastat_base>`_ project on GitHub. This module is part of the `OCA/intrastat-extrastat <https://github.com/OCA/intrastat-extrastat/tree/17.0/intrastat_base>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@@ -62,7 +62,7 @@ class ResCompany(models.Model):
logger.warning("The XML file is invalid against the XML Schema Definition") logger.warning("The XML file is invalid against the XML Schema Definition")
logger.warning(xml_bytes) logger.warning(xml_bytes)
logger.warning(e) logger.warning(e)
usererror = "{}\n\n{}".format(e.__class__.__name__, str(e)) usererror = f"{e.__class__.__name__}\n\n{str(e)}"
raise UserError(usererror) from e raise UserError(usererror) from e
except Exception as e: except Exception as e:
error = _("Unknown Error") error = _("Unknown Error")

View File

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

View File

@@ -0,0 +1,5 @@
- Alexis de Lattre, Akretion \<<alexis.delattre@akretion.com>\>
- Luc De Meyer, Noviat \<<info@noviat.com>\>
- Kumar Aberer, brain-tec AG \<<kumar.aberer@braintec-group.com>\>
- Andrea Stirpe \<<a.stirpe@onestein.nl>\>
- Denis Roussel \<<denis.roussel@acsone.eu>\>

View File

@@ -1,5 +0,0 @@
* Alexis de Lattre, Akretion <alexis.delattre@akretion.com>
* Luc De Meyer, Noviat <info@noviat.com>
* Kumar Aberer, brain-tec AG <kumar.aberer@braintec-group.com>
* Andrea Stirpe <a.stirpe@onestein.nl>
* Denis Roussel <denis.roussel@acsone.eu>

View File

@@ -0,0 +1,11 @@
This module contains common functions for the intrastat reporting and
should be used in combination with the generic reporting module
*intrastat_product* and with the country-specific reporting modules such
as:
- *l10n_fr_intrastat_service*: the module for the *Déclaration
Européenne des Services* (DES) for France
- *l10n_fr_intrastat_product*: the module for the *Déclaration d'Echange
de Biens* (DEB) for France
- *l10n_be_intrastat_product*: the module for the Intrastat Declaration
for Belgium.

View File

@@ -1,11 +0,0 @@
This module contains common functions for the intrastat reporting and
should be used in combination with the generic reporting module
*intrastat_product* and with the country-specific reporting modules such
as:
- *l10n_fr_intrastat_service*:
the module for the *Déclaration Européenne des Services* (DES) for France
- *l10n_fr_intrastat_product*:
the module for the *Déclaration d'Echange de Biens* (DEB) for France
- *l10n_be_intrastat_product*:
the module for the Intrastat Declaration for Belgium.

View File

@@ -0,0 +1,6 @@
WARNING:
This module conflicts with the module *account_intrastat* from Odoo
Enterprise. If you have already installed the module
*account_intrastat*, you should uninstall it first before installing
this module.

View File

@@ -1,5 +0,0 @@
WARNING:
This module conflicts with the module *account_intrastat* from Odoo Enterprise.
If you have already installed the module *account_intrastat*,
you should uninstall it first before installing this module.

View File

@@ -1,5 +1,6 @@
This module adds an intrastat property on fiscal positions. This module adds an intrastat property on fiscal positions.
With this module, the country field on partners becomes a required field. With this module, the country field on partners becomes a required
field.
It adds an *Intrastat* section on the *Invoicing* configuration page. It adds an *Intrastat* section on the *Invoicing* configuration page.

View File

@@ -369,18 +369,18 @@ ul.auto-toc {
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:28aa058f14d9b8414cad83bafa1c8d416330287450167531b2787c4d47348560 !! source digest: sha256:28aa058f14d9b8414cad83bafa1c8d416330287450167531b2787c4d47348560
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/intrastat-extrastat/tree/16.0/intrastat_base"><img alt="OCA/intrastat-extrastat" src="https://img.shields.io/badge/github-OCA%2Fintrastat--extrastat-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/intrastat-extrastat-16-0/intrastat-extrastat-16-0-intrastat_base"><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/intrastat-extrastat&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><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/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/intrastat-extrastat/tree/17.0/intrastat_base"><img alt="OCA/intrastat-extrastat" src="https://img.shields.io/badge/github-OCA%2Fintrastat--extrastat-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/intrastat-extrastat-17-0/intrastat-extrastat-17-0-intrastat_base"><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/intrastat-extrastat&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 contains common functions for the intrastat reporting and <p>This module contains common functions for the intrastat reporting and
should be used in combination with the generic reporting module should be used in combination with the generic reporting module
<em>intrastat_product</em> and with the country-specific reporting modules such <em>intrastat_product</em> and with the country-specific reporting modules such
as:</p> as:</p>
<ul class="simple"> <ul class="simple">
<li><em>l10n_fr_intrastat_service</em>: <li><em>l10n_fr_intrastat_service</em>: the module for the <em>Déclaration
the module for the <em>Déclaration Européenne des Services</em> (DES) for France</li> Européenne des Services</em> (DES) for France</li>
<li><em>l10n_fr_intrastat_product</em>: <li><em>l10n_fr_intrastat_product</em>: the module for the <em>Déclaration
the module for the <em>Déclaration dEchange de Biens</em> (DEB) for France</li> dEchange de Biens</em> (DEB) for France</li>
<li><em>l10n_be_intrastat_product</em>: <li><em>l10n_be_intrastat_product</em>: the module for the Intrastat Declaration
the module for the Intrastat Declaration for Belgium.</li> for Belgium.</li>
</ul> </ul>
<p><strong>Table of contents</strong></p> <p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents"> <div class="contents local topic" id="contents">
@@ -399,14 +399,16 @@ the module for the Intrastat Declaration for Belgium.</li>
<div class="section" id="installation"> <div class="section" id="installation">
<h1><a class="toc-backref" href="#toc-entry-1">Installation</a></h1> <h1><a class="toc-backref" href="#toc-entry-1">Installation</a></h1>
<p>WARNING:</p> <p>WARNING:</p>
<p>This module conflicts with the module <em>account_intrastat</em> from Odoo Enterprise. <p>This module conflicts with the module <em>account_intrastat</em> from Odoo
If you have already installed the module <em>account_intrastat</em>, Enterprise. If you have already installed the module
you should uninstall it first before installing this module.</p> <em>account_intrastat</em>, you should uninstall it first before installing
this module.</p>
</div> </div>
<div class="section" id="usage"> <div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1> <h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
<p>This module adds an intrastat property on fiscal positions.</p> <p>This module adds an intrastat property on fiscal positions.</p>
<p>With this module, the country field on partners becomes a required field.</p> <p>With this module, the country field on partners becomes a required
field.</p>
<p>It adds an <em>Intrastat</em> section on the <em>Invoicing</em> configuration page.</p> <p>It adds an <em>Intrastat</em> section on the <em>Invoicing</em> configuration page.</p>
</div> </div>
<div class="section" id="bug-tracker"> <div class="section" id="bug-tracker">
@@ -414,7 +416,7 @@ you should uninstall it first before installing this module.</p>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/intrastat-extrastat/issues">GitHub Issues</a>. <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/intrastat-extrastat/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported. 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 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/intrastat-extrastat/issues/new?body=module:%20intrastat_base%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/intrastat-extrastat/issues/new?body=module:%20intrastat_base%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> <p>Do not contact contributors directly about support or help with technical issues.</p>
</div> </div>
<div class="section" id="credits"> <div class="section" id="credits">
@@ -446,7 +448,7 @@ mission is to support the collaborative development of Odoo features and
promote its widespread use.</p> promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p> <p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
<p><a class="reference external image-reference" href="https://github.com/alexis-via"><img alt="alexis-via" src="https://github.com/alexis-via.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/luc-demeyer"><img alt="luc-demeyer" src="https://github.com/luc-demeyer.png?size=40px" /></a></p> <p><a class="reference external image-reference" href="https://github.com/alexis-via"><img alt="alexis-via" src="https://github.com/alexis-via.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/luc-demeyer"><img alt="luc-demeyer" src="https://github.com/luc-demeyer.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/intrastat-extrastat/tree/16.0/intrastat_base">OCA/intrastat-extrastat</a> project on GitHub.</p> <p>This module is part of the <a class="reference external" href="https://github.com/OCA/intrastat-extrastat/tree/17.0/intrastat_base">OCA/intrastat-extrastat</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> <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>
</div> </div>

View File

@@ -2,7 +2,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
class IntrastatCommon(object): class IntrastatCommon:
@classmethod @classmethod
def setUpClass(cls): def setUpClass(cls):
super().setUpClass() super().setUpClass()