-
-
Notifications
You must be signed in to change notification settings - Fork 552
[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
base: 17.0
Are you sure you want to change the base?
Conversation
cherry-pick of #1442 |
Please remove |
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).
1372e89
to
9cfee10
Compare
currency = etree.SubElement(party_account, "Ccy") | ||
currency.text = ( | ||
self.journal_id.currency_id.name or self.company_currency_id.name | ||
) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
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
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).