[18.0][FIX] l10n_es_aeat_sii_oca: SII description is not multi-line + offending chars - #4865
Merged
OCA-git-bot merged 2 commits intoFeb 25, 2026
Conversation
Using `l10n_es_aeat_sii_match` for comparing results from AEAT with Odoo, I have found that the AEAT is accepting line feeds in the query, but not storing, replacing the character by spaces, so there's no perfect matching when later comparing them. Although the computed description is not putting that line breaks (line descriptions are joined with ` - `), someone may edit that descriptions and introduce them, so you will have the problem. For avoiding the temptation, let's convert the field to one line text.
AEAT is not storing accented chars, ñ, ç, which is a bit sad being Spain... but for having a perfect match on contrast, we should decode the string and replace those characters. For that, we are using the same library as in `l10n_es_aeat`, which is unidecode.
Member
Author
|
¡Comprobado que funciona correctamente y ya compara el contenido exacto! /ocabot merge patch |
Contributor
|
What a great day to merge this nice PR. Let's do it! |
Contributor
|
Congratulations, your PR was merged at b3586f6. Thanks a lot for contributing to OCA. ❤️ |
pedrobaeza
deleted the
18.0-fix-l10n_es_aeat_sii_oca-description_one_line
branch
February 25, 2026 21:29
pedrobaeza
added a commit
to Tecnativa/l10n-spain
that referenced
this pull request
Feb 26, 2026
When initializing an invoice, there are no descriptions, and unidecode gives an error, so let's avoid putting the conditional. Follow-up of OCA#4865
EmilioPascual
pushed a commit
to moduon/l10n-spain
that referenced
this pull request
Apr 15, 2026
When initializing an invoice, there are no descriptions, and unidecode gives an error, so let's avoid putting the conditional. Follow-up of OCA#4865
EmilioPascual
pushed a commit
to moduon/l10n-spain
that referenced
this pull request
May 20, 2026
When initializing an invoice, there are no descriptions, and unidecode gives an error, so let's avoid putting the conditional. Follow-up of OCA#4865
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Using
l10n_es_aeat_sii_matchfor comparing results from AEAT with Odoo, I have found that the AEAT is accepting line feeds in the query, but not storing them, replacing the character by spaces, so there's no perfect matching when later comparing them.Although the computed description is not putting that line breaks (line descriptions are joined with
-), someone may edit that descriptions and introduce them, so you will have the problem.For avoiding the temptation, let's convert the field to one line text.
@Tecnativa