From 4d46d09a4b361df0b82a1d2473f52f3e14e2fc2d Mon Sep 17 00:00:00 2001 From: Miquel Alzanillas Date: Wed, 22 Nov 2023 22:18:54 +0100 Subject: [PATCH] [IMP] account_payment_partner: pre-commit auto fixes --- account_payment_partner/README.rst | 89 +++++++++---------- account_payment_partner/__manifest__.py | 2 +- .../models/account_move.py | 2 +- account_payment_partner/pyproject.toml | 3 + .../readme/CONTRIBUTORS.md | 15 ++++ .../readme/CONTRIBUTORS.rst | 16 ---- account_payment_partner/readme/DESCRIPTION.md | 17 ++++ .../readme/DESCRIPTION.rst | 22 ----- account_payment_partner/readme/HISTORY.md | 4 + account_payment_partner/readme/HISTORY.rst | 5 -- .../readme/{USAGE.rst => USAGE.md} | 8 +- .../static/description/index.html | 26 +++--- .../tests/test_account_payment_partner.py | 4 +- 13 files changed, 103 insertions(+), 110 deletions(-) create mode 100644 account_payment_partner/pyproject.toml create mode 100644 account_payment_partner/readme/CONTRIBUTORS.md delete mode 100644 account_payment_partner/readme/CONTRIBUTORS.rst create mode 100644 account_payment_partner/readme/DESCRIPTION.md delete mode 100644 account_payment_partner/readme/DESCRIPTION.rst create mode 100644 account_payment_partner/readme/HISTORY.md delete mode 100644 account_payment_partner/readme/HISTORY.rst rename account_payment_partner/readme/{USAGE.rst => USAGE.md} (69%) diff --git a/account_payment_partner/README.rst b/account_payment_partner/README.rst index 9b00aa81d..7847d172d 100644 --- a/account_payment_partner/README.rst +++ b/account_payment_partner/README.rst @@ -17,39 +17,34 @@ Account Payment Partner :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fbank--payment-lightgray.png?logo=github - :target: https://github.com/OCA/bank-payment/tree/16.0/account_payment_partner + :target: https://github.com/OCA/bank-payment/tree/17.0/account_payment_partner :alt: OCA/bank-payment .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/bank-payment-16-0/bank-payment-16-0-account_payment_partner + :target: https://translation.odoo-community.org/projects/bank-payment-17-0/bank-payment-17-0-account_payment_partner :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/bank-payment&target_branch=16.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/bank-payment&target_branch=17.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| This module adds several fields: -* the *Supplier Payment Mode* and *Customer Payment Mode* on Partners, +- the *Supplier Payment Mode* and *Customer Payment Mode* on Partners, +- the *Payment Mode* on Invoices. +- the *Show bank account* on Payment Mode. +- the *# of digits for customer bank account* on Payment Mode. +- the *Bank account from journals* on Payment Mode. +- the *Payment mode* on Invoices Analysis. -* the *Payment Mode* on Invoices. +On a Payment Order, in the wizard *Select Invoices to Pay*, the invoices +will be filtered per Payment Mode. -* the *Show bank account* on Payment Mode. - -* the *# of digits for customer bank account* on Payment Mode. - -* the *Bank account from journals* on Payment Mode. - -* the *Payment mode* on Invoices Analysis. - -On a Payment Order, in the wizard *Select Invoices to Pay*, the invoices will -be filtered per Payment Mode. - -Allows to print in the invoice to which account number the payment -(via SEPA direct debit) is going to be charged so the customer knows that +Allows to print in the invoice to which account number the payment (via +SEPA direct debit) is going to be charged so the customer knows that information, but there are some customers that don't want that everyone -looking at the invoice sees the full account number (and even GDPR can say a -word about that), so that's the reason behind the several options. +looking at the invoice sees the full account number (and even GDPR can +say a word about that), so that's the reason behind the several options. **Table of contents** @@ -61,11 +56,11 @@ Usage You are able to add a payment mode directly on a partner. -This payment mode is automatically associated to the invoice related to the -partner. This default value could be changed in a draft invoice. +This payment mode is automatically associated to the invoice related to +the partner. This default value could be changed in a draft invoice. -When you create a payment order, only invoices related to chosen payment mode -are displayed. +When you create a payment order, only invoices related to chosen payment +mode are displayed. Invoices without any payment mode are displayed too. @@ -73,10 +68,10 @@ Changelog ========= 10.0.1.2.0 (2018-05-24) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- -* [IMP] Add options to show partner bank account in invoice report - (`#458 `_) +- [IMP] Add options to show partner bank account in invoice report + (`#458 `__) Bug Tracker =========== @@ -84,7 +79,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 to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -92,33 +87,35 @@ Credits ======= Authors -~~~~~~~ +------- * Akretion * Tecnativa Contributors -~~~~~~~~~~~~ +------------ -* Alexis de Lattre -* Raphaël Valyi -* Stefan Rijnhart (Therp) -* Alexandre Fayolle -* Stéphane Bidoul -* Danimar Ribeiro -* Angel Moya -* `Tecnativa `_: +- Alexis de Lattre +- Raphaël Valyi +- Stefan Rijnhart (Therp) +- Alexandre Fayolle +- Stéphane Bidoul +- Danimar Ribeiro +- Angel Moya +- `Tecnativa `__: - * Pedro M. Baeza - * Carlos Dauden - * Víctor Martínez -* `DynApps `_: + - Pedro M. Baeza + - Carlos Dauden + - Víctor Martínez - * Raf Ven -* Marçal Isern +- `DynApps `__: + + - Raf Ven + +- Marçal Isern Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -130,6 +127,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/bank-payment `_ project on GitHub. +This module is part of the `OCA/bank-payment `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_payment_partner/__manifest__.py b/account_payment_partner/__manifest__.py index 7f4c64d67..2b878e45c 100644 --- a/account_payment_partner/__manifest__.py +++ b/account_payment_partner/__manifest__.py @@ -6,7 +6,7 @@ { "name": "Account Payment Partner", - "version": "16.0.1.2.2", + "version": "17.0.1.0.0", "category": "Banking addons", "license": "AGPL-3", "summary": "Adds payment mode on partners and invoices", diff --git a/account_payment_partner/models/account_move.py b/account_payment_partner/models/account_move.py index 5462b181a..a0230afeb 100644 --- a/account_payment_partner/models/account_move.py +++ b/account_payment_partner/models/account_move.py @@ -130,7 +130,7 @@ class AccountMove(models.Model): def _reverse_moves(self, default_values_list=None, cancel=False): if not default_values_list: default_values_list = [{} for _ in self] - for move, default_values in zip(self, default_values_list): + for move, default_values in zip(self, default_values_list, strict=True): default_values[ "payment_mode_id" ] = move.payment_mode_id.refund_payment_mode_id.id diff --git a/account_payment_partner/pyproject.toml b/account_payment_partner/pyproject.toml new file mode 100644 index 000000000..4231d0ccc --- /dev/null +++ b/account_payment_partner/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/account_payment_partner/readme/CONTRIBUTORS.md b/account_payment_partner/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..e9fae6787 --- /dev/null +++ b/account_payment_partner/readme/CONTRIBUTORS.md @@ -0,0 +1,15 @@ +- Alexis de Lattre \<\> +- Raphaël Valyi +- Stefan Rijnhart (Therp) +- Alexandre Fayolle +- Stéphane Bidoul \<\> +- Danimar Ribeiro +- Angel Moya \<\> +- [Tecnativa](https://www.tecnativa.com): + - Pedro M. Baeza + - Carlos Dauden + - Víctor Martínez +- [DynApps](https://www.dynapps.be): + - Raf Ven \<\> +- Marçal Isern \<\> +- Miquel Alzanillas \<\> diff --git a/account_payment_partner/readme/CONTRIBUTORS.rst b/account_payment_partner/readme/CONTRIBUTORS.rst deleted file mode 100644 index 5c60e6775..000000000 --- a/account_payment_partner/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,16 +0,0 @@ -* Alexis de Lattre -* Raphaël Valyi -* Stefan Rijnhart (Therp) -* Alexandre Fayolle -* Stéphane Bidoul -* Danimar Ribeiro -* Angel Moya -* `Tecnativa `_: - - * Pedro M. Baeza - * Carlos Dauden - * Víctor Martínez -* `DynApps `_: - - * Raf Ven -* Marçal Isern diff --git a/account_payment_partner/readme/DESCRIPTION.md b/account_payment_partner/readme/DESCRIPTION.md new file mode 100644 index 000000000..987c74fa0 --- /dev/null +++ b/account_payment_partner/readme/DESCRIPTION.md @@ -0,0 +1,17 @@ +This module adds several fields: + +- the *Supplier Payment Mode* and *Customer Payment Mode* on Partners, +- the *Payment Mode* on Invoices. +- the *Show bank account* on Payment Mode. +- the *\# of digits for customer bank account* on Payment Mode. +- the *Bank account from journals* on Payment Mode. +- the *Payment mode* on Invoices Analysis. + +On a Payment Order, in the wizard *Select Invoices to Pay*, the invoices +will be filtered per Payment Mode. + +Allows to print in the invoice to which account number the payment (via +SEPA direct debit) is going to be charged so the customer knows that +information, but there are some customers that don't want that everyone +looking at the invoice sees the full account number (and even GDPR can +say a word about that), so that's the reason behind the several options. diff --git a/account_payment_partner/readme/DESCRIPTION.rst b/account_payment_partner/readme/DESCRIPTION.rst deleted file mode 100644 index fccb47082..000000000 --- a/account_payment_partner/readme/DESCRIPTION.rst +++ /dev/null @@ -1,22 +0,0 @@ -This module adds several fields: - -* the *Supplier Payment Mode* and *Customer Payment Mode* on Partners, - -* the *Payment Mode* on Invoices. - -* the *Show bank account* on Payment Mode. - -* the *# of digits for customer bank account* on Payment Mode. - -* the *Bank account from journals* on Payment Mode. - -* the *Payment mode* on Invoices Analysis. - -On a Payment Order, in the wizard *Select Invoices to Pay*, the invoices will -be filtered per Payment Mode. - -Allows to print in the invoice to which account number the payment -(via SEPA direct debit) is going to be charged so the customer knows that -information, but there are some customers that don't want that everyone -looking at the invoice sees the full account number (and even GDPR can say a -word about that), so that's the reason behind the several options. diff --git a/account_payment_partner/readme/HISTORY.md b/account_payment_partner/readme/HISTORY.md new file mode 100644 index 000000000..2edcc1968 --- /dev/null +++ b/account_payment_partner/readme/HISTORY.md @@ -0,0 +1,4 @@ +## 10.0.1.2.0 (2018-05-24) + +- \[IMP\] Add options to show partner bank account in invoice report + ([\#458](https://github.com/OCA/bank-payment/issues/458)) diff --git a/account_payment_partner/readme/HISTORY.rst b/account_payment_partner/readme/HISTORY.rst deleted file mode 100644 index 8424df5d0..000000000 --- a/account_payment_partner/readme/HISTORY.rst +++ /dev/null @@ -1,5 +0,0 @@ -10.0.1.2.0 (2018-05-24) -~~~~~~~~~~~~~~~~~~~~~~~ - -* [IMP] Add options to show partner bank account in invoice report - (`#458 `_) diff --git a/account_payment_partner/readme/USAGE.rst b/account_payment_partner/readme/USAGE.md similarity index 69% rename from account_payment_partner/readme/USAGE.rst rename to account_payment_partner/readme/USAGE.md index 09ef27577..5568d2c8a 100644 --- a/account_payment_partner/readme/USAGE.rst +++ b/account_payment_partner/readme/USAGE.md @@ -1,9 +1,9 @@ You are able to add a payment mode directly on a partner. -This payment mode is automatically associated to the invoice related to the -partner. This default value could be changed in a draft invoice. +This payment mode is automatically associated to the invoice related to +the partner. This default value could be changed in a draft invoice. -When you create a payment order, only invoices related to chosen payment mode -are displayed. +When you create a payment order, only invoices related to chosen payment +mode are displayed. Invoices without any payment mode are displayed too. diff --git a/account_payment_partner/static/description/index.html b/account_payment_partner/static/description/index.html index 71c581ae6..1cec785e5 100644 --- a/account_payment_partner/static/description/index.html +++ b/account_payment_partner/static/description/index.html @@ -369,7 +369,7 @@ ul.auto-toc { !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:1e2b38367db6bacc47711402f2eb9ef0f076f2c8a0317874407c547af811eb59 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Mature License: AGPL-3 OCA/bank-payment Translate me on Weblate Try me on Runboat

+

Mature License: AGPL-3 OCA/bank-payment Translate me on Weblate Try me on Runboat

This module adds several fields:

  • the Supplier Payment Mode and Customer Payment Mode on Partners,
  • @@ -379,13 +379,13 @@ ul.auto-toc {
  • the Bank account from journals on Payment Mode.
  • the Payment mode on Invoices Analysis.
-

On a Payment Order, in the wizard Select Invoices to Pay, the invoices will -be filtered per Payment Mode.

-

Allows to print in the invoice to which account number the payment -(via SEPA direct debit) is going to be charged so the customer knows that +

On a Payment Order, in the wizard Select Invoices to Pay, the invoices +will be filtered per Payment Mode.

+

Allows to print in the invoice to which account number the payment (via +SEPA direct debit) is going to be charged so the customer knows that information, but there are some customers that don’t want that everyone -looking at the invoice sees the full account number (and even GDPR can say a -word about that), so that’s the reason behind the several options.

+looking at the invoice sees the full account number (and even GDPR can +say a word about that), so that’s the reason behind the several options.

Table of contents

    @@ -406,10 +406,10 @@ word about that), so that’s the reason behind the several options.

    Usage

    You are able to add a payment mode directly on a partner.

    -

    This payment mode is automatically associated to the invoice related to the -partner. This default value could be changed in a draft invoice.

    -

    When you create a payment order, only invoices related to chosen payment mode -are displayed.

    +

    This payment mode is automatically associated to the invoice related to +the partner. This default value could be changed in a draft invoice.

    +

    When you create a payment order, only invoices related to chosen payment +mode are displayed.

    Invoices without any payment mode are displayed too.

    @@ -427,7 +427,7 @@ are displayed.

    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 to smash it by providing a detailed and welcomed -feedback.

    +feedback.

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

    @@ -469,7 +469,7 @@ If you spotted it first, help us to smash 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/bank-payment project on GitHub.

    +

    This module is part of the OCA/bank-payment project on GitHub.

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

diff --git a/account_payment_partner/tests/test_account_payment_partner.py b/account_payment_partner/tests/test_account_payment_partner.py index 517746b27..705ec7043 100644 --- a/account_payment_partner/tests/test_account_payment_partner.py +++ b/account_payment_partner/tests/test_account_payment_partner.py @@ -251,7 +251,7 @@ class TestAccountPaymentPartner(TransactionCase): ) invoice.action_post() aml = invoice.line_ids.filtered( - lambda l: l.account_id.account_type == "liability_payable" + lambda x: x.account_id.account_type == "liability_payable" ) self.assertEqual(invoice.payment_mode_id, aml[0].payment_mode_id) # Test payment mode change on aml @@ -269,7 +269,7 @@ class TestAccountPaymentPartner(TransactionCase): ) invoice.action_post() aml = invoice.line_ids.filtered( - lambda l: l.account_id.account_type == "asset_receivable" + lambda x: x.account_id.account_type == "asset_receivable" ) self.assertEqual(invoice.payment_mode_id, aml[0].payment_mode_id)