Skip to content

[18.0][FIX] l10n_es_aeat_sii_oca: SII description is not multi-line + offending chars - #4865

Merged
OCA-git-bot merged 2 commits into
OCA:18.0from
Tecnativa:18.0-fix-l10n_es_aeat_sii_oca-description_one_line
Feb 25, 2026
Merged

[18.0][FIX] l10n_es_aeat_sii_oca: SII description is not multi-line + offending chars#4865
OCA-git-bot merged 2 commits into
OCA:18.0from
Tecnativa:18.0-fix-l10n_es_aeat_sii_oca-description_one_line

Conversation

@pedrobaeza

@pedrobaeza pedrobaeza commented Feb 25, 2026

Copy link
Copy Markdown
Member

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 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

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.
@pedrobaeza pedrobaeza added this to the 18.0 milestone Feb 25, 2026
@pedrobaeza pedrobaeza changed the title [18.0][FIX] l10n_es_aeat_sii_oca: SII description is not multi-line [18.0][FIX] l10n_es_aeat_sii_oca: SII description is not multi-line + offending chars Feb 25, 2026
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.
@pedrobaeza

Copy link
Copy Markdown
Member Author

¡Comprobado que funciona correctamente y ya compara el contenido exacto!

/ocabot merge patch

@OCA-git-bot

Copy link
Copy Markdown
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 18.0-ocabot-merge-pr-4865-by-pedrobaeza-bump-patch, awaiting test results.

@OCA-git-bot
OCA-git-bot merged commit e3b4e74 into OCA:18.0 Feb 25, 2026
5 of 7 checks passed
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at b3586f6. Thanks a lot for contributing to OCA. ❤️

@pedrobaeza
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants