Skip to content

[17.0][FIX] account_banking_pain_base : fix DbtrAcct node #1452

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 17.0
Choose a base branch
from

Conversation

luc-demeyer
Copy link
Contributor

The DbtrAcct node should contain the currency of the bank account for outgoing payments.

It's not a required element in the pain XSD but not specifying it can have bad consequences when paying from multi-currency bank accounts.

I encountered this issue twice in the last year with German and Balgian banks.

Assume you have a bank account number with two financial journals for EUR and USD.

If you initiate a USD payment from your EUR bank account than the bank will try to remove the money from your USD bank account (which is a problem if you don't have enough dollars on that account).

@luc-demeyer
Copy link
Contributor Author

cherry-pick of #1442

@pedrobaeza pedrobaeza added this to the 17.0 milestone Apr 23, 2025
@pedrobaeza
Copy link
Member

Please remove [16.0] from the commit message.

The DbtrAcct node should contain the currency of the bank account for
outgoing payments.

It's not a required element in the pain XSD but not specifying it
can have bad consequences when paying from multi-currency bank accounts.

I encountered this issue twice in the last year with German and Balgian banks.

Assume you have a bank account number with two financial journals for EUR
and USD.

If you initiate a USD payment from your EUR bank account than the bank will
try to remove the money from your USD bank account (which is a problem if
you don't have enough dollars on that account).
@luc-demeyer luc-demeyer force-pushed the 17-fix-pain-dbtracct-ccy branch from 1372e89 to 9cfee10 Compare May 1, 2025 14:48
currency = etree.SubElement(party_account, "Ccy")
currency.text = (
self.journal_id.currency_id.name or self.company_currency_id.name
)
Copy link

@patrickt-oforce patrickt-oforce May 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Italy with this node the payment file is rejected from bank, because the standard not specificy the currency node for debtor account. Actually I don't know if every SEPA debit / credit pain specifiy this node in DbtrAcct; but if it is only for Sepa Credit Transfer, suggest to override the method in the module account_banking_sepa_credit_transfer and add the node there conditioned to PAIN flavour

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@patrickt-oforce
I can hardly believe that the presence of the Ccy tag is the reason of the rejection.
I also checked the pain.001.001.09.xsd and also in this newer standard (becoming mandatory by november 2025 !) the Ccy tag remains optional.

Can you send me

  • the failing pain file
  • the error message from the bank

Since a payment file is confidential, please send me the data offline ([email protected]). I can send an NDA if required.

Copy link

@patrickt-oforce patrickt-oforce May 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @luc-demeyer this the bank error about Ccy attribute
image
You can find the xsd for the italian sct on https://github.com/OCA/l10n-italy/blob/16.0/l10n_it_sct_cbi/data/standards/CBIPaymentRequest.00.04.01.xsd#L45
If you check the type CBICashAccount2 there is no mention about Ccy node

The sct file is modified to hide some information, but the nodes are untouched, the extension is txt because Github not allow to load xml file, need to change the fiel extension
sct_PAY0318_OCA.txt

Add to this, if you want you can check this PR#4751 in OCA/l10n-italy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants