[FIX]pms_l10n_es: traveller report document type name

This commit is contained in:
Darío Lodeiros
2021-09-28 21:53:00 +02:00
committed by Eric Antones
parent fb4d272a5d
commit 4b3d75d7d5

View File

@@ -101,11 +101,11 @@ class TravellerReport(models.TransientModel):
for line in lines:
content += "2"
# [P|N|..]
if line.document_type != "D":
if line.document_type.name != "D":
content += "||" + line.document_number.upper() + "|"
else:
content += "|" + line.document_number.upper() + "||"
content += line.document_type + "|"
content += line.document_type.name + "|"
content += line.document_expedition_date.strftime("%Y%m%d") + "|"
content += line.lastname.upper() + "|"
if line.lastname2: