Skip to content

OCA/bank-payment-alternative

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Runboat Pre-commit Status Build Status codecov Translation Status

Bank Payment - Alternative approach based on Odoo native payment methods

This projet is, as its name suggests, an alternative to the OCA bank-payment project. The code of the 18.0 branch of OCA/bank-payment-alternative originates from pull request 1174 entitled Large refactoring/improvement/cleanup of OCA/bank-payment for 16.0 by Alexis de Lattre (Akretion). As a consequence, the code of the 18.0 branch of OCA/bank-payment-alternative doesn't contain some of the changes/improvements made in the 16.0 branch after commit da11fcfd1de2072906a170adc21d2b0cc78c9638, in 17.0 and 18.0 branches of OCA/bank-payment.

In Odoo 18.0, three new fields were added in the account module: two fields on res.partner for Customer Payment Method and Supplier Payment Method and a field Payment Method on invoices. These 3 new fields are many2one fields that point to account.payment.method.line. These fields are redunant with the equivalent fields definied in the OCA module account_payment_partner of the project OCA/bank-payment that point to account.payment.mode which is defined in the OCA module account_payment_mode from OCA/bank-payment.

On 18.0, the project OCA/bank-payment continues to use the object account.payment.mode and, by default, hides the 3 equivalent fields of the account module that point to account.payment.method.line.

On the contrary, the project OCA/bank-payment-alternative made the changes in the code base to fully adopt the three new Payment Method fields added in the account module in Odoo 18.0.

In Odoo 19.0, Odoo added a many2one field that point to account.payment.method.line on sale orders.

According to the draft pull request 207284 on odoo master branch, Odoo plans to merge the object account.payment.method.line into the object account.payment.method. The project OCA/bank-payment-alternative plans to follow the evolution of the native datamodel in future versions of Odoo.

In the project OCA/bank-payment-alternative, the modules had to be renamed. In the table below, you will find the correspondance between the modules names of OCA/bank-payment and OCA/bank-payment-alternative:

OCA/bank-payment OCA/bank-payment-alternative
account_payment_mode native + account_payment_base_oca
account_payment_partner native
account_payment_sale account_payment_base_oca_sale
account_payment_order account_payment_batch_oca
account_payment_order_tier_validation account_payment_batch_oca_tier_validation
account_banking_pain_base account_payment_sepa_base
account_banking_sepa_credit_transfer account_payment_sepa_credit_transfer
account_banking_mandate account_payment_mandate
account_banking_mandate_sale account_payment_mandate_sale
account_banking_sepa_direct_debit account_payment_sepa_direct_debit

If a developer wants to update an existing OCA module and make it depend on OCA/bank-payment-alternative instead of OCA/bank-payment, the developer should rename the module. That way, the module can continue to evolve under its original name with the dependency on OCA/bank-payment.

For example, in OCA/l10n-france, there is a module named account_banking_fr_lcr since 8.0 that adds support for French Letter of Change. This module used to depend on account_payment_order from OCA/bank-payment up to 17.0. An OCA developper migrated this module to 18.0 and switched its dependecy from account_payment_order from OCA/bank-payment to account_payment_batch_oca from OCA/bank-payment-alternative ; he renamed the module to account_payment_fr_lcr. That way, the development of the module account_banking_fr_lcr can continue with the dependency on account_payment_order from OCA/bank-payment on 18.0 and upper versions.

The project OCA/bank-payment-alternative also introduced several new features and improvements, listed below by order of importance :

  • Introduce a new object for payment lots account.payment.lot which is used to ease the generation of SCT and SDD XML files. This object is also used in the bank statement reconcile interface, to make it easy for the user to reconcile bank statement lines that correspond to a payment lot (module account_payment_batch_oca_reconcile).
  • Take into account the boolean field allow_out_payment of res.partner.bank on payment orders: when you try to confirm a payment order that has bank accounts on payment lines with allow_out_payment = False, the user gets a blocking error message. The affected payment lines will be shown in red and the user will have a smart button that gives access to the bank accounts that are not allowed to send money to. To enable allow_out_payment, the user needs to be part of a specific group Validate bank accounts (XMLID account.group_validate_bank_account). As a consequence, the native ACL of res.partner.bank that give full rights to partner manager is not inherited any more: the security is handled by the boolean field allow_out_payment.
  • the datamodel of the mandate has been simplified: the field format also has the information of the scheme field, so format now has 3 possible values : basic, sepa_core or sepa_b2b. The field scheme has been removed. The field type has 2 possible values: recurrent or oneoff (instead of 3 possible values : generic, recurrent or oneoff). The field recurrent_sequence_type has been removed because we don't need to handle the first vs recurring sequence any more : since November 2016, the requirement to use the sequence type 'First' in a first of a recurrent series of Collections is no longer mandatory according to the EPC, cf SDD Core Rulebook. The final sequence is now supported by the state field which has a new final state that can be activated via a button. The field partner_id is NOT a related field of partner_bank_id any more, which solves the bug account_banking_mandate: Change in the filtering behavior of the "Bank Account" field. With all these simplifications on the mandate datamodel, the form view and list view of mandates are more user-friendly.
  • by default, there is a sequence for payment orders and another sequence for debit orders. It is possible to configure a specific sequence for a payment method.
  • add support for Regulatory Reporting in the SEPA XML structure (tag RgltryRptg). Needed in some countries for international non-SEPA credit transfers.
  • replace unstructured address by structured address in SEPA XML file (mandatory starting november 2025 according to the EPC).
  • add support for pain.008.01.08 (SDD) and pain.001.001.09 (SCT), which are now the recommended versions of the EPC.
  • easier download of the banking file after generation.
  • add field acc_number_scrambled on res.partner.bank for easy and direct use of scrambled account number.
  • search on partner from payment/debit orders search view.
  • support currencies with decimal_places != 2 in ISO20022 XML file generation
  • on mandates, fields format, type, signature date and partner become readonly when the mandate is not in draft state
  • remove support for pain.001.001.02/04/05 (SCT) and pain.008.01.03/04 (SDD) which have never been selected by the EPC, in order to simplify the code that generate the XML.
  • stop using safe_eval() in XML generation.
  • replace all @api.onchange by computed fields.
  • add sql unicity constraint on payment order number per company.

Available addons

addon version maintainers summary
account_payment_base_oca 18.0.1.6.0 alexis-via OCA extensions to native payment objects of Odoo
account_payment_base_oca_sale 18.0.2.0.0 Adds payment method on sale orders
account_payment_batch_oca 18.0.3.4.0 Add payment orders and debit orders
account_payment_batch_oca_reconcile 18.0.1.0.0 alexis-via Easy reconciliation of payment/debit lots on bank statement reconcile interface
account_payment_batch_oca_tier_validation 18.0.1.0.0 marcelsavegnago Tier validation process on payment/debit orders
account_payment_mandate 18.0.2.1.0 Add support for banking mandates used in direct debits
account_payment_mandate_sale 18.0.1.0.0 alexis-via Adds mandates on sale orders
account_payment_sepa_base 18.0.2.2.0 Base module for SEPA file generation
account_payment_sepa_credit_transfer 18.0.3.0.1 Create SEPA XML files for Credit Transfers
account_payment_sepa_direct_debit 18.0.3.0.0 Create SEPA files for Direct Debit

Licenses

This repository is licensed under AGPL-3.0.

However, each module can have a totally different license, as long as they adhere to Odoo Community Association (OCA) policy. Consult each module's __manifest__.py file, which contains a license key that explains its license.


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.

About

Bank Payment - Alternative approach based on Odoo native payment methods

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Contributors 142