diff --git a/account_payment_order/README.rst b/account_payment_order/README.rst index 3e810b633f72..ea837d5e910e 100644 --- a/account_payment_order/README.rst +++ b/account_payment_order/README.rst @@ -17,13 +17,13 @@ Account Payment Order :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_order + :target: https://github.com/OCA/bank-payment/tree/17.0/account_payment_order :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_order + :target: https://translation.odoo-community.org/projects/bank-payment-17-0/bank-payment-17-0-account_payment_order :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| @@ -40,28 +40,32 @@ Installation This module depends on: -* account_payment_partner -* base_iban -* document +- account_payment_partner +- base_iban +- document This modules is part of the OCA/bank-payment suite. Configuration ============= -This module adds several options on Payment Modes, cf Invoicing/Accounting > -Configuration > Management > Payment Modes. +This module adds several options on Payment Modes, cf +Invoicing/Accounting > Configuration > Management > Payment Modes. Usage ===== -You can create a Payment order via the menu Invoicing/Accounting > Vendors > Payment Orders and then select the move lines to pay. +You can create a Payment order via the menu Invoicing/Accounting > +Vendors > Payment Orders and then select the move lines to pay. -You can create a Debit order via the menu Invoicing/Accounting > Customers > Debit Orders and then select the move lines to debit. +You can create a Debit order via the menu Invoicing/Accounting > +Customers > Debit Orders and then select the move lines to debit. -This module also adds an action *Add to Payment Order* on supplier invoices and *Add to Debit Order* on customer invoices. +This module also adds an action *Add to Payment Order* on supplier +invoices and *Add to Debit Order* on customer invoices. -You can print a Payment order via the menu Invoicing/Accounting > Vendors > Payment Orders and then select the payment oder to print. +You can print a Payment order via the menu Invoicing/Accounting > +Vendors > Payment Orders and then select the payment oder to print. Bug Tracker =========== @@ -69,7 +73,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. @@ -77,7 +81,7 @@ Credits ======= Authors -~~~~~~~ +------- * ACSONE SA/NV * Therp BV @@ -85,43 +89,45 @@ Authors * Akretion Contributors -~~~~~~~~~~~~ +------------ -* Stéphane Bidoul -* Alexis de Lattre -* Adrien Peiffer -* Stefan Rijnhart -* Laurent Mignon -* Alexandre Fayolle -* Danimar Ribeiro -* Erwin van der Ploeg -* Raphaël Valyi -* Sandy Carter -* Angel Moya -* Jose María Alzaga -* Meyomesse Gilles -* Denis Roussel +- Stéphane Bidoul +- Alexis de Lattre +- Adrien Peiffer +- Stefan Rijnhart +- Laurent Mignon +- Alexandre Fayolle +- Danimar Ribeiro +- Erwin van der Ploeg +- Raphaël Valyi +- Sandy Carter +- Angel Moya +- Jose María Alzaga +- Meyomesse Gilles +- Denis Roussel +- `DynApps `__: -* `DynApps `_: + - Raf Ven - * Raf Ven -* Andrea Stirpe -* `Jarsa `_: +- Andrea Stirpe +- `Jarsa `__: - * Alan Ramos -* `Tecnativa `_: + - Alan Ramos - * Pedro M. Baeza - * Carlos Dauden - * Carlos Roca +- `Tecnativa `__: -* `Open Source Integrators `_: + - Pedro M. Baeza + - Carlos Dauden + - Carlos Roca - * Ammar Officewala -* Marçal Isern +- `Open Source Integrators `__: + + - Ammar Officewala + +- Marçal Isern Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -133,6 +139,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_order/models/account_move.py b/account_payment_order/models/account_move.py index 3faae049e312..d34c3974d117 100644 --- a/account_payment_order/models/account_move.py +++ b/account_payment_order/models/account_move.py @@ -84,9 +84,11 @@ def _get_payment_order_communication_full(self): invoice_partials, exchange_diff_moves, ) = self._get_reconciled_invoices_partials() - for (_x, _y, payment_move_line,) in ( - invoice_partials + exchange_diff_moves - ): + for ( + _x, + _y, + payment_move_line, + ) in invoice_partials + exchange_diff_moves: payment_move = payment_move_line.move_id if payment_move not in reference_moves: references.append( @@ -140,7 +142,7 @@ def create_account_payment_line(self): % move.name ) payment_lines = applicable_lines.payment_line_ids.filtered( - lambda l: l.state in ("draft", "open", "generated") + lambda x: x.state in ("draft", "open", "generated") ) if payment_lines: raise UserError( @@ -167,7 +169,7 @@ def create_account_payment_line(self): action_payment_type = payorder.payment_type count = 0 for line in applicable_lines.filtered( - lambda x: x.payment_mode_id == payment_mode + lambda x, mode=payment_mode: x.payment_mode_id == mode ): line.create_payment_line_from_move_line(payorder) count += 1 diff --git a/account_payment_order/models/account_payment.py b/account_payment_order/models/account_payment.py index ee3409e634f4..25a33720a6fd 100644 --- a/account_payment_order/models/account_payment.py +++ b/account_payment_order/models/account_payment.py @@ -29,7 +29,7 @@ def _compute_payment_method_line_fields(self): if to_exclude: pay.available_payment_method_line_ids = ( pay.available_payment_method_line_ids.filtered( - lambda x: x.code not in to_exclude + lambda x, y=to_exclude: x.code not in y ) ) return res diff --git a/account_payment_order/models/account_payment_order.py b/account_payment_order/models/account_payment_order.py index 76330fa92a3a..839c66c59141 100644 --- a/account_payment_order/models/account_payment_order.py +++ b/account_payment_order/models/account_payment_order.py @@ -163,7 +163,7 @@ def unlink(self): "cancel it in order to do so." ) ) - return super(AccountPaymentOrder, self).unlink() + return super().unlink() @api.constrains("payment_type", "payment_mode_id") def payment_order_constraints(self): @@ -238,7 +238,7 @@ def create(self, vals_list): vals["journal_id"] = payment_mode.fixed_journal_id.id if not vals.get("date_prefered") and payment_mode.default_date_prefered: vals["date_prefered"] = payment_mode.default_date_prefered - return super(AccountPaymentOrder, self).create(vals_list) + return super().create(vals_list) @api.onchange("payment_mode_id") def payment_mode_id_change(self): @@ -429,7 +429,7 @@ def generated2uploaded(self): ( payment.payment_line_ids.move_line_id + payment.move_id.line_ids.filtered( - lambda x: x.account_id == payment.destination_account_id + lambda x, p=payment: x.account_id == p.destination_account_id ) ).reconcile() self.write( diff --git a/account_payment_order/pyproject.toml b/account_payment_order/pyproject.toml new file mode 100644 index 000000000000..4231d0cccb3d --- /dev/null +++ b/account_payment_order/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/account_payment_order/readme/CONFIGURE.md b/account_payment_order/readme/CONFIGURE.md new file mode 100644 index 000000000000..e23fca16e826 --- /dev/null +++ b/account_payment_order/readme/CONFIGURE.md @@ -0,0 +1,2 @@ +This module adds several options on Payment Modes, cf +Invoicing/Accounting \> Configuration \> Management \> Payment Modes. diff --git a/account_payment_order/readme/CONFIGURE.rst b/account_payment_order/readme/CONFIGURE.rst deleted file mode 100644 index e19ef3baf79b..000000000000 --- a/account_payment_order/readme/CONFIGURE.rst +++ /dev/null @@ -1,2 +0,0 @@ -This module adds several options on Payment Modes, cf Invoicing/Accounting > -Configuration > Management > Payment Modes. diff --git a/account_payment_order/readme/CONTRIBUTORS.md b/account_payment_order/readme/CONTRIBUTORS.md new file mode 100644 index 000000000000..dadc0120e97c --- /dev/null +++ b/account_payment_order/readme/CONTRIBUTORS.md @@ -0,0 +1,26 @@ +- Stéphane Bidoul \<\> +- Alexis de Lattre \<\> +- Adrien Peiffer \<\> +- Stefan Rijnhart +- Laurent Mignon \<\> +- Alexandre Fayolle +- Danimar Ribeiro +- Erwin van der Ploeg +- Raphaël Valyi +- Sandy Carter +- Angel Moya \<\> +- Jose María Alzaga \<\> +- Meyomesse Gilles \<\> +- Denis Roussel \<\> +- [DynApps](https://www.dynapps.be): + - Raf Ven \<\> +- Andrea Stirpe \<\> +- [Jarsa](https://www.jarsa.com.mx): + - Alan Ramos \<\> +- [Tecnativa](https://www.tecnativa.com): + - Pedro M. Baeza + - Carlos Dauden + - Carlos Roca +- [Open Source Integrators](https://www.opensourceintegrators.com): + - Ammar Officewala \<\> +- Marçal Isern \<\> diff --git a/account_payment_order/readme/CONTRIBUTORS.rst b/account_payment_order/readme/CONTRIBUTORS.rst deleted file mode 100644 index c6d4d1c03d48..000000000000 --- a/account_payment_order/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,32 +0,0 @@ -* Stéphane Bidoul -* Alexis de Lattre -* Adrien Peiffer -* Stefan Rijnhart -* Laurent Mignon -* Alexandre Fayolle -* Danimar Ribeiro -* Erwin van der Ploeg -* Raphaël Valyi -* Sandy Carter -* Angel Moya -* Jose María Alzaga -* Meyomesse Gilles -* Denis Roussel - -* `DynApps `_: - - * Raf Ven -* Andrea Stirpe -* `Jarsa `_: - - * Alan Ramos -* `Tecnativa `_: - - * Pedro M. Baeza - * Carlos Dauden - * Carlos Roca - -* `Open Source Integrators `_: - - * Ammar Officewala -* Marçal Isern diff --git a/account_payment_order/readme/DESCRIPTION.rst b/account_payment_order/readme/DESCRIPTION.md similarity index 98% rename from account_payment_order/readme/DESCRIPTION.rst rename to account_payment_order/readme/DESCRIPTION.md index 11a1fe4cd750..904bacf0f909 100644 --- a/account_payment_order/readme/DESCRIPTION.rst +++ b/account_payment_order/readme/DESCRIPTION.md @@ -1 +1 @@ -This module adds support for payment orders and debit orders. +This module adds support for payment orders and debit orders. diff --git a/account_payment_order/readme/INSTALL.rst b/account_payment_order/readme/INSTALL.md similarity index 58% rename from account_payment_order/readme/INSTALL.rst rename to account_payment_order/readme/INSTALL.md index 2ea6c6ae6549..e8593707f142 100644 --- a/account_payment_order/readme/INSTALL.rst +++ b/account_payment_order/readme/INSTALL.md @@ -1,7 +1,7 @@ -This module depends on: - -* account_payment_partner -* base_iban -* document - -This modules is part of the OCA/bank-payment suite. +This module depends on: + +- account_payment_partner +- base_iban +- document + +This modules is part of the OCA/bank-payment suite. diff --git a/account_payment_order/readme/USAGE.md b/account_payment_order/readme/USAGE.md new file mode 100644 index 000000000000..1c7a76a3fa5f --- /dev/null +++ b/account_payment_order/readme/USAGE.md @@ -0,0 +1,11 @@ +You can create a Payment order via the menu Invoicing/Accounting \> +Vendors \> Payment Orders and then select the move lines to pay. + +You can create a Debit order via the menu Invoicing/Accounting \> +Customers \> Debit Orders and then select the move lines to debit. + +This module also adds an action *Add to Payment Order* on supplier +invoices and *Add to Debit Order* on customer invoices. + +You can print a Payment order via the menu Invoicing/Accounting \> +Vendors \> Payment Orders and then select the payment oder to print. diff --git a/account_payment_order/readme/USAGE.rst b/account_payment_order/readme/USAGE.rst deleted file mode 100644 index ec551e4cca4e..000000000000 --- a/account_payment_order/readme/USAGE.rst +++ /dev/null @@ -1,7 +0,0 @@ -You can create a Payment order via the menu Invoicing/Accounting > Vendors > Payment Orders and then select the move lines to pay. - -You can create a Debit order via the menu Invoicing/Accounting > Customers > Debit Orders and then select the move lines to debit. - -This module also adds an action *Add to Payment Order* on supplier invoices and *Add to Debit Order* on customer invoices. - -You can print a Payment order via the menu Invoicing/Accounting > Vendors > Payment Orders and then select the payment oder to print. diff --git a/account_payment_order/report/account_payment_order.py b/account_payment_order/report/account_payment_order.py index ca8fefc7b70b..c60a03f1f38c 100644 --- a/account_payment_order/report/account_payment_order.py +++ b/account_payment_order/report/account_payment_order.py @@ -36,11 +36,11 @@ def get_bank_account_name(self, partner_bank): if partner_bank.bank_name: name = "%s: " % partner_bank.bank_id.name if partner_bank.acc_number: - name = "{} {}".format(name, partner_bank.acc_number) + name = f"{name} {partner_bank.acc_number}" if partner_bank.bank_bic: name = "%s - " % (name) if partner_bank.bank_bic: - name = "{} BIC {}".format(name, partner_bank.bank_bic) + name = f"{name} BIC {partner_bank.bank_bic}" return name else: return False diff --git a/account_payment_order/static/description/index.html b/account_payment_order/static/description/index.html index baeb60e3a8a2..9443ec4df8d4 100644 --- a/account_payment_order/static/description/index.html +++ b/account_payment_order/static/description/index.html @@ -369,7 +369,7 @@

Account Payment Order

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:0399e2f98f07d9c21c128885229a0263686b56ece85f6c3fdf4f2a61445b62fe !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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 support for payment orders and debit orders.

Table of contents

@@ -398,22 +398,26 @@

Installation

Configuration

-

This module adds several options on Payment Modes, cf Invoicing/Accounting > -Configuration > Management > Payment Modes.

+

This module adds several options on Payment Modes, cf +Invoicing/Accounting > Configuration > Management > Payment Modes.

Usage

-

You can create a Payment order via the menu Invoicing/Accounting > Vendors > Payment Orders and then select the move lines to pay.

-

You can create a Debit order via the menu Invoicing/Accounting > Customers > Debit Orders and then select the move lines to debit.

-

This module also adds an action Add to Payment Order on supplier invoices and Add to Debit Order on customer invoices.

-

You can print a Payment order via the menu Invoicing/Accounting > Vendors > Payment Orders and then select the payment oder to print.

+

You can create a Payment order via the menu Invoicing/Accounting > +Vendors > Payment Orders and then select the move lines to pay.

+

You can create a Debit order via the menu Invoicing/Accounting > +Customers > Debit Orders and then select the move lines to debit.

+

This module also adds an action Add to Payment Order on supplier +invoices and Add to Debit Order on customer invoices.

+

You can print a Payment order via the menu Invoicing/Accounting > +Vendors > Payment Orders and then select the payment oder to print.

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.

@@ -473,7 +477,7 @@

Maintainers

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_order/tests/test_account_payment.py b/account_payment_order/tests/test_account_payment.py index d06d25afb681..a223e20e7d0d 100644 --- a/account_payment_order/tests/test_account_payment.py +++ b/account_payment_order/tests/test_account_payment.py @@ -42,7 +42,6 @@ def _get_payment_method_information(self): "_get_payment_method_information", _get_payment_method_information, ): - cls.inbound_payment_method_01 = cls.payment_method_model.create( { "name": "inbound", diff --git a/account_payment_order/tests/test_payment_mode.py b/account_payment_order/tests/test_payment_mode.py index 51bce1e70324..787388813d56 100644 --- a/account_payment_order/tests/test_payment_mode.py +++ b/account_payment_order/tests/test_payment_mode.py @@ -50,7 +50,6 @@ def _get_payment_method_information(self): "_get_payment_method_information", _get_payment_method_information, ): - cls.electronic_out = cls.env["account.payment.method"].create( { "name": "Electronic Out", diff --git a/account_payment_order/wizard/account_payment_line_create.py b/account_payment_order/wizard/account_payment_line_create.py index 0759c5ef6d14..dd076c802e9c 100644 --- a/account_payment_order/wizard/account_payment_line_create.py +++ b/account_payment_order/wizard/account_payment_line_create.py @@ -44,7 +44,7 @@ class AccountPaymentLineCreate(models.TransientModel): @api.model def default_get(self, field_list): - res = super(AccountPaymentLineCreate, self).default_get(field_list) + res = super().default_get(field_list) context = self.env.context assert ( context.get("active_model") == "account.payment.order"