Skip to content

[all versions] sepa boolean should be false when a payment line has a mandate with format=basic #1476

@alexis-via

Description

@alexis-via

Scenario to reproduce the bug in v18 or earlier versions:

  1. Use a company with an IBAN in the SEPA zone
  2. create a mandate with format = Basic linked to an IBAN bank account in the SEPA zone
  3. create a customer invoice in EUR with this mandate and push it on a SEPA direct debit order
  4. On the debit order, sepa = true... we should have sepa = false !

Image

This bug affects all versions of odoo from v9 to v18 (since the introduction of the sepa boolean field on account.payment.order).

The solution is to inherit the method _compute_sepa_final_hook() of account.payment.order in account_banking_sepa_direct_debit. In fact, for perf reasons, it's better to create another hook on account.payment.line placed in the loop on payment lines here: https://github.com/OCA/bank-payment/blob/18.0/account_banking_pain_base/models/account_payment_order.py#L152

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions