Skip to content

Commit e838508

Browse files
Pedro M. BaezaEmilioPascual
authored andcommitted
[FIX] l10n_es_aeat_sii_oca: No error if no description
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
1 parent 4a8a5ec commit e838508

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
@@ -681,7 +681,7 @@ def _compute_sii_description(self):
681681
names = invoice.mapped("invoice_line_ids.name") or invoice.mapped(
682682
"invoice_line_ids.ref"
683683
)
684-
names = [unidecode(x) for x in names] # Avoid "ugly" chars
684+
names = [unidecode(x) for x in names if x] # Avoid "ugly" chars
685685
description += " - ".join(filter(None, names))
686686
invoice.sii_description = (description or "")[:500] or "/"
687687

0 commit comments

Comments
 (0)