Skip to content

Commit 4c70aa7

Browse files
committed
[FIX] l10n_uy_ux: cleanup spaces in product description
closes #414 X-original-commit: 5b83ca9 Signed-off-by: Julia Elizondo - jue (#l10n) <jue@adhoc.com.ar>
1 parent f504ee3 commit 4c70aa7

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

l10n_uy_ux/models/account_move.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,10 @@ def _l10n_uy_edi_get_line_nom_and_desc(self, aml):
309309
Sobrescribimos este método que devuelve el valor de NomItem y DscItem para cada línea del comprobante...
310310
"""
311311
# B7 NomItem, B8 DscItem
312-
nom_item = aml.name and aml.name[:80] or "-"
313-
description = aml.name and aml.name[80:] or ""
312+
# Limpiamos saltos de línea que pueden romper el PDF
313+
clean_name = aml.name.replace("\n", " ").replace("\r", " ") if aml.name else ""
314+
nom_item = clean_name[:80] or "-"
315+
description = clean_name[80:] or ""
314316

315317
if aml.l10n_uy_edi_addenda_ids:
316318
adenda = [

0 commit comments

Comments
 (0)