-
-
Notifications
You must be signed in to change notification settings - Fork 586
Description
[ADD] New modules contract_payment_method and contract_payment_mandate
This Pull Request introduces two new modules in the bank-payment-alternate branch of the contract repository.
These modules provide functional parity with the existing modules in the bank-payment branch, enabling full compatibility between contracts and the bank-payment-alternative ecosystem.
🔄 Equivalence with the bank-payment branch
Module in bank-payment |
Module in bank-payment-alternate |
|---|---|
contract_payment_mode |
contract_payment_method |
contract_mandate |
contract_payment_mandate |
🧩 Modules included in this PR
1. contract_payment_method
This module is the counterpart of contract_payment_mode.
It provides:
- Payment method selection on contracts (
account.payment.method). - Automatic propagation of the payment method to invoices generated from the contract.
- A structure aligned with OCA standards and the original module’s design.
2. contract_payment_mandate
This module mirrors the functionality of contract_mandate.
It includes:
- Contract-level mandate assignment and validation.
- Integration with the
account_payment_mandatemodule frombank-payment-alternative. - An architecture consistent with OCA guidelines and the original implementation.
🎯 Purpose of the PR
This PR aligns the contract repository with the bank-payment-alternative ecosystem by providing parallel modules equivalent to those in the bank-payment branch.
The result:
- Full compatibility between contracts and the alternative payment method/mandate workflow.
- Functional consistency across both ecosystems.
- A clear and maintainable structure for future extensions.
🧭 Naming conventions applied
To maintain consistency between the two payment ecosystems, the following naming rules were applied:
-
Modules in the standard bank-payment ecosystem use:
*_mode,*_mandate -
Modules in the bank-payment-alternative ecosystem use:
*_method,*_payment_mandate -
Functional prefixes such as
contract_remain unchanged to preserve clarity.
This maintains semantic parallelism and avoids ambiguity while clearly distinguishing the ecosystems.
✔️ Status of the contribution
- Modules created
- Dependencies defined
- OCA module structure followed
- Initial tests included (if applicable)
- Individual module documentation (
README.rst) included
Further tests or documentation enhancements can be added upon reviewer request.
❓ Uncertainty regarding the appropriate repository for these modules
It is not entirely clear whether these modules should live in the contract repository, as implemented in this PR, or whether their more appropriate home would be the bank-payment-alternative repository.
This question arises because, within the alternative payment ecosystem, there are precedents such as:
account_payment_mandateaccount_payment_mandate_sale
Both modules reside in bank-payment-alternative, even though their functional domains belong to account and sale.
This suggests that modules related to the alternative payment workflow may belong to the payment ecosystem repository, even when they extend functionalities in other business areas such as contracts.
We therefore request guidance from reviewers on whether:
contract_payment_methodandcontract_payment_mandateshould remain in the contract repository,
or- They should be moved to bank-payment-alternative, ensuring symmetry with the existing module structure in that ecosystem.
We are open to relocating the modules if the review team considers that a better alignment with OCA architecture.
🙏 Request for review
Feedback is welcomed regarding:
- Structure and dependency choices
- Naming conventions and alignment with OCA practices
- Whether the naming convention should be formalized in repository guidelines
Thank you for reviewing and helping maintain consistency across the OCA payment ecosystems.