Skip to content
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

[14.0] account_banking_pain_base: Wrong length in AdrLine #1209

Open
jonerikceberio opened this issue Jan 17, 2024 · 2 comments
Open

[14.0] account_banking_pain_base: Wrong length in AdrLine #1209

jonerikceberio opened this issue Jan 17, 2024 · 2 comments
Labels

Comments

@jonerikceberio
Copy link

When generating the PAIN file, the second node AdrLine is generated as the join of zip and city. Both fields are limited to 70 char in the process, but then are joined, which can result in a >70 char AdrLine, and therefore in an error:
odoo.addons.account_banking_pain_base.models.account_payment_order: Element '{urn:iso:std:iso:20022:tech:xsd:pain.008.001.02}AdrLine': [facet 'maxLength'] The value has a length of '76'; this exceeds the allowed maximum length of '70'

To Reproduce:

  • Create a partner with zip and city, and length of the city field with a length of 70.
  • Create an invoice to that partner
  • Add the invoce to a payment order
  • Generate the file, which will turn into an error

Possible solution:

  • Modify line 550, slicing the result of the join to 70
  • Modify line 546, substracting to 70 the length of the first element in val (if it exists) + 1 (for the space of the join)
Copy link

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jul 21, 2024
@alexis-via
Copy link
Contributor

I confirm this very stupid bug. It was introduced by @luc-demeyer in this commit 198fc3c
I fixed yesterday it in my v16 PR #1174 (I re-wrote the code for address block generation ; it implements both structured and unstructured and I found and fixed the bug in the unstructered code).

@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Aug 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants