Skip to content

Commit

Permalink
[IMP] companyweb_payment_info: pre-commit auto fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mathisjacoby committed Dec 6, 2023
1 parent 202c7a5 commit fc520ef
Show file tree
Hide file tree
Showing 14 changed files with 54 additions and 61 deletions.
43 changes: 21 additions & 22 deletions companyweb_payment_info/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,19 @@ Companyweb Payment Info
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--belgium-lightgray.png?logo=github
:target: https://github.com/OCA/l10n-belgium/tree/16.0/companyweb_payment_info
:target: https://github.com/OCA/l10n-belgium/tree/17.0/companyweb_payment_info
:alt: OCA/l10n-belgium
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/l10n-belgium-16-0/l10n-belgium-16-0-companyweb_payment_info
:target: https://translation.odoo-community.org/projects/l10n-belgium-17-0/l10n-belgium-17-0-companyweb_payment_info
: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/l10n-belgium&target_branch=16.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-belgium&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module provides Companyweb customers the ability to send open invoices
This module provides Companyweb customers the ability to send open
invoices

**Table of contents**

Expand All @@ -46,50 +47,48 @@ Usage

This module comes with 1 security groups.

* Upload Companyweb Data : can upload invoice to Companyweb
- Upload Companyweb Data : can upload invoice to Companyweb

In order to use this module you should
* be in the right security group
* set a vat for the company you are logged in
* have companyweb credentials
* have open invoices for customer with a belgian's vat
In order to use this module you should \* be in the right security group
\* set a vat for the company you are logged in \* have companyweb
credentials \* have open invoices for customer with a belgian's vat

The module's wizard helps you to configure what's needed
You'll find the wizard under the "Customer" menu of the accounting app
The module's wizard helps you to configure what's needed You'll find the
wizard under the "Customer" menu of the accounting app

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-belgium/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/l10n-belgium/issues/new?body=module:%20companyweb_payment_info%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/l10n-belgium/issues/new?body=module:%20companyweb_payment_info%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.

Credits
=======

Authors
~~~~~~~
-------

* ACSONE SA/NV

Contributors
~~~~~~~~~~~~
------------

* Xavier Bouquiaux <[email protected]>
* Stéphane Bidoul <[email protected]>
- Xavier Bouquiaux <[email protected]>
- Stéphane Bidoul <[email protected]>

Other credits
~~~~~~~~~~~~~
-------------

In 2021, the module developed under the current form, to support the new
Companyweb SOAP api. This development has been funded by `Companyweb
<https://www.companyweb.be>`__.
Companyweb SOAP api. This development has been funded by
`Companyweb <https://www.companyweb.be>`__.

Maintainers
~~~~~~~~~~~
-----------

This module is maintained by the OCA.

Expand All @@ -109,6 +108,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-xavier-bouquiaux|

This module is part of the `OCA/l10n-belgium <https://github.com/OCA/l10n-belgium/tree/16.0/companyweb_payment_info>`_ project on GitHub.
This module is part of the `OCA/l10n-belgium <https://github.com/OCA/l10n-belgium/tree/17.0/companyweb_payment_info>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions companyweb_payment_info/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
2 changes: 2 additions & 0 deletions companyweb_payment_info/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Xavier Bouquiaux \<<[email protected]>\>
- Stéphane Bidoul \<<[email protected]>\>
2 changes: 0 additions & 2 deletions companyweb_payment_info/readme/CONTRIBUTORS.rst

This file was deleted.

3 changes: 3 additions & 0 deletions companyweb_payment_info/readme/CREDITS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
In 2021, the module developed under the current form, to support the new
Companyweb SOAP api. This development has been funded by
[Companyweb](https://www.companyweb.be).
3 changes: 0 additions & 3 deletions companyweb_payment_info/readme/CREDITS.rst

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
This module provides Companyweb customers the ability to send open invoices
This module provides Companyweb customers the ability to send open
invoices
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This module can be installed in the usual way. It depends on the OCA
``companyweb_base`` module.
`companyweb_base` module.
10 changes: 10 additions & 0 deletions companyweb_payment_info/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
This module comes with 1 security groups.

- Upload Companyweb Data : can upload invoice to Companyweb

In order to use this module you should \* be in the right security group
\* set a vat for the company you are logged in \* have companyweb
credentials \* have open invoices for customer with a belgian's vat

The module's wizard helps you to configure what's needed You'll find the
wizard under the "Customer" menu of the accounting app
12 changes: 0 additions & 12 deletions companyweb_payment_info/readme/USAGE.rst

This file was deleted.

24 changes: 12 additions & 12 deletions companyweb_payment_info/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,9 @@ <h1 class="title">Companyweb Payment Info</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:69bc861b45bc9358b0537d067dab8528398e3cd4638d7e520f4919992650796f
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.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/l10n-belgium/tree/16.0/companyweb_payment_info"><img alt="OCA/l10n-belgium" src="https://img.shields.io/badge/github-OCA%2Fl10n--belgium-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/l10n-belgium-16-0/l10n-belgium-16-0-companyweb_payment_info"><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/l10n-belgium&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 provides Companyweb customers the ability to send open invoices</p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.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/l10n-belgium/tree/17.0/companyweb_payment_info"><img alt="OCA/l10n-belgium" src="https://img.shields.io/badge/github-OCA%2Fl10n--belgium-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/l10n-belgium-17-0/l10n-belgium-17-0-companyweb_payment_info"><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/l10n-belgium&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 provides Companyweb customers the ability to send open
invoices</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
Expand All @@ -397,20 +398,18 @@ <h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
<ul class="simple">
<li>Upload Companyweb Data : can upload invoice to Companyweb</li>
</ul>
<p>In order to use this module you should
* be in the right security group
* set a vat for the company you are logged in
* have companyweb credentials
* have open invoices for customer with a belgian’s vat</p>
<p>The module’s wizard helps you to configure what’s needed
You’ll find the wizard under the “Customer” menu of the accounting app</p>
<p>In order to use this module you should * be in the right security group
* set a vat for the company you are logged in * have companyweb
credentials * have open invoices for customer with a belgian’s vat</p>
<p>The module’s wizard helps you to configure what’s needed You’ll find the
wizard under the “Customer” menu of the accounting app</p>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/l10n-belgium/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/l10n-belgium/issues/new?body=module:%20companyweb_payment_info%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/l10n-belgium/issues/new?body=module:%20companyweb_payment_info%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">
Expand All @@ -431,7 +430,8 @@ <h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
<div class="section" id="other-credits">
<h2><a class="toc-backref" href="#toc-entry-7">Other credits</a></h2>
<p>In 2021, the module developed under the current form, to support the new
Companyweb SOAP api. This development has been funded by <a class="reference external" href="https://www.companyweb.be">Companyweb</a>.</p>
Companyweb SOAP api. This development has been funded by
<a class="reference external" href="https://www.companyweb.be">Companyweb</a>.</p>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2>
Expand All @@ -442,7 +442,7 @@ <h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2>
promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external image-reference" href="https://github.com/xavier-bouquiaux"><img alt="xavier-bouquiaux" src="https://github.com/xavier-bouquiaux.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-belgium/tree/16.0/companyweb_payment_info">OCA/l10n-belgium</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-belgium/tree/17.0/companyweb_payment_info">OCA/l10n-belgium</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>
Expand Down
2 changes: 0 additions & 2 deletions companyweb_payment_info/tests/test_cweb_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def _init_security_group(self):
group.write({"users": add_user})

def _init_company_vat(self):

self.env.user.company_id.vat = "BE0835207216"

def _init_cweb_credentials(self):
Expand Down Expand Up @@ -84,7 +83,6 @@ def _init_invoice(self):

@freeze_time("2022-01-13") # because the login hash includes the date
def test_upload_payment(self):

# UserError because of security
with self.assertRaises(UserError):
self.env["companyweb_payment_info.payment_info_wizard"].with_user(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class CompanyWebCredentialWizardPayment(models.TransientModel):

_name = "companyweb_payment_info.credential_wizard_payment"
_description = "Ask for Companyweb login & password"
_inherit = ["companyweb_base.credential_wizard_abstract"]
Expand Down
5 changes: 0 additions & 5 deletions companyweb_payment_info/wizards/payment_info_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ def _chunks(lst, chunk_size):


class CompanyWebPaymentInfoWizard(models.TransientModel):

_name = "companyweb_payment_info.payment_info_wizard"
_description = "Companyweb Payment Info"
wizard_text = fields.Html("wizard_text")
Expand Down Expand Up @@ -50,7 +49,6 @@ def _check_group(self):

@api.model
def _cweb_payment_info_step1(self):

self._check_group()

supplierVat = self.env.user.company_id.vat
Expand Down Expand Up @@ -114,7 +112,6 @@ def _get_period_to_send(self):

@api.model
def _cweb_payment_info_step2(self):

self._check_group()

client = zeep.Client(
Expand Down Expand Up @@ -225,7 +222,6 @@ def _create_step1_summary(
period_to_send.year,
)
if response_previous_period["PreviousPeriodExists"]:

summary = _(
"<h2>Companyweb upload</h2>"
"You are about to submit <strong>{nb_invoice}</strong> open invoices <br/>"
Expand Down Expand Up @@ -339,7 +335,6 @@ def _get_module_version(self):
return str(version_base) + "&" + str(version_payment)

def _cweb_send_batch(self, client, invoices_to_send, transaction_key):

invoice_list_type = client.get_type("ns0:ArrayOfInvoiceRequest")

for invoices_request_to_send_splitted in _chunks(
Expand Down

0 comments on commit fc520ef

Please sign in to comment.