Skip to content

Commit 9eb151d

Browse files
committed
[IMP] l10n_es_aeat_sii_oca: Replace line feeds by spaces in SII description
Although the field is now a single-line string, Odoo encodes line feeds as `\n` when computing the SII description from the invoice lines, so when sending that to the AEAT, they are not kept as is in the end. On that cases, doing the SII match contrast, they will say there's no exact match due to that. Let's replace the line feeds by spaces in advance to avoid this problem.
1 parent 96a5c5c commit 9eb151d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

l10n_es_aeat_sii_oca/models/account_move.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ def _compute_sii_description(self):
672672
"invoice_line_ids.ref"
673673
)
674674
names = [unidecode(x) for x in names if x] # Avoid "ugly" chars
675-
description += " - ".join(filter(None, names))
675+
description += " - ".join(filter(None, names)).replace("\n", " ")
676676
invoice.sii_description = (description or "")[:500] or "/"
677677

678678
@api.depends(

0 commit comments

Comments
 (0)