Repository
OCA/bank-payment-alternative · module folder · Try on Runboat
Module version
1.1.0
Category
Accounting
Folder size
0.11 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/bank-payment-alternative
Last tracking update
2026-08-07 09:06:26
Authors
Akretion, Odoo Community Association (OCA)
Maintainers
Akretion, Odoo Community Association (OCA)
Committers
Alexis de Lattre, OCA-git-bot, oca-ci, Zina Rasoamanana
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
account_payment_base_oca_sale, account_payment_batch_oca
Description
This is the new base module for the OCA project **bank-payment-alternative**. As the name suggests, the OCA project **bank-payment-alternative** is an alternative to the OCA project **bank-payment**. The project **bank-payment-alternative** uses the native payment method object of Odoo (model *account.payment.method.line*) which has been introduced in Odoo v15 and is used on partners and invoices since Odoo v18.

This module adds support for variable link between bank/cash journal and payment method. A typical use case is for a company that has several bank accounts and wants to have an outbound payment method *Wire transfer to suppliers* which is not linked to a specific bank account and decide which bank account will be debited when confirming the payment order.

This module also adds support for the display of partially scrambled bank account numbers. This is useful for some inbound payment methods where the company debits the bank account of its customers and the company wants to show on its customer invoices the bank account number that will be debited without printing the full bank account number, but print it partially scrambled.

Code Analysis

Views touched (9)
XML IDNameModelTypeStatus
account_invoice_report_view_tree account.invoice.report tree Inherits account.account_invoice_report_view_tree
account_payment_method_form account.payment.method form Inherits account_payment_method_base.account_payment_method_form
account_payment_method_line_form account.payment.method.line.form account.payment.method.line form New
account_payment_method_line_search account.payment.method.line.search account.payment.method.line search New
account_payment_method_list account.payment.method list Inherits account_payment_method_base.account_payment_method_list
view_account_invoice_report_search account.invoice.report search Inherits account.view_account_invoice_report_search
view_account_payment_method_line_tree account.payment.method.line tree Inherits account.view_account_payment_method_line_tree
view_invoice_tree account_payment_partner.view_invoice_tree account.move tree Inherits account.view_invoice_tree
view_move_form account.move form Inherits account.view_move_form
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (7)

New fields (1)
  • payment_method_line_id Many2one → account.payment.method.line
    readonly=True string='Payment Method' args: 'account.payment.method.line'
Public methods (0)

No public methods.

New fields (2)
  • bank_account_required Boolean
    related='preferred_payment_method_line_id.payment_method_id.bank_account_required'
  • payment_method_code Char
    related='preferred_payment_method_line_id.payment_method_id.code' store=True
Public methods (0)

No public methods.

New fields (1)
  • bank_account_required Boolean
    help='Activate this option if this payment method requires you to know the bank account number of your customer or supplier.'
Public methods (0)

No public methods.

New fields (14)
  • active Boolean
    default=True
  • bank_account_link Selection
    default='fixed' help="For payment methods that are always attached to the same bank account of your company (such as wire transfer from customers or SEPA direct debit from suppliers), select 'Fixed'. For payment methods that are not always attached to the same bank account (such as SEPA Direct debit for customers, wire transfer to suppliers), you should select 'Variable', which means that you will select the bank account on the payment order. If your company only has one bank account, you should always select 'Fixed'." required=True string='Link to Bank Account' args: [('fixed', 'Fixed'), ('variable', 'Variable')]
  • company_id Many2one → res.company
    compute='_compute_company_id' precompute=True readonly=False related=False required=True store=True args: 'res.company'
  • filter_journal_ids Many2many → account.journal
    compute='_compute_filter_journal_ids' args: 'account.journal'
  • journal_id Many2one
    domain="[('id', 'in', filter_journal_ids)]"
  • name Char
    translate=True
  • payment_account_id Many2one
    string='Outstanding Payment/Receipt Account'
  • payment_method_id Many2one
    string='Technical Payment Method'
  • refund_payment_method_line_id Many2one → account.payment.method.line
    check_company=True comodel_name='account.payment.method.line' domain="[('payment_type', '!=', payment_type)]" help='This payment method will be used when doing refunds coming from the current payment method.' string='Payment Method for Refunds'
  • report_description Html
    translate=True
  • selectable Boolean
    string='Selectable on Partners/Invoices'
  • show_bank_account Selection
    default='full' help='On invoice report, show partial or full bank account number.' selection=[('full', 'Full'), ('first', 'First n chars'), ('last', 'Last n chars'), ('first_last', 'First n chars and Last n chars'), ('no', 'No')] string='Show Customer Bank Account'
  • show_bank_account_chars Integer
    default=4 string='# of Digits to Show for Customer Bank Account'
  • variable_journal_ids Many2many → account.journal
    check_company=True column1='method_line_id' column2='journal_id' comodel_name='account.journal' compute='_compute_variable_journal_ids' domain="[('id', 'in', filter_journal_ids)]" precompute=True readonly=False relation='account_payment_method_line_variable_journal_rel' store=True string='Allowed Bank Journals'
Public methods (1)
  • write(self, vals)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • property_inbound_payment_method_line_id Many2one
    domain=<expr>
  • property_outbound_payment_method_line_id Many2one
    domain=<expr>
Public methods (0)

No public methods.

New fields (1)
  • acc_number_scrambled Char
    compute='_compute_acc_number_scrambled'
Public methods (1)
  • get_acc_number(self, show_policy, show_chars=4)

Loading…