From e4da0abf8c67e0e26c088be0a36009424f3973f0 Mon Sep 17 00:00:00 2001 From: miguelpadin Date: Tue, 26 Oct 2021 11:45:35 +0200 Subject: [PATCH 1/2] [FIX] pms-l10n-es: fix document type @ traveller report (change name by code) --- pms_l10n_es/wizards/traveller_report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pms_l10n_es/wizards/traveller_report.py b/pms_l10n_es/wizards/traveller_report.py index 10eb7a97c..6f96de21b 100644 --- a/pms_l10n_es/wizards/traveller_report.py +++ b/pms_l10n_es/wizards/traveller_report.py @@ -105,7 +105,7 @@ class TravellerReport(models.TransientModel): content += "||" + line.document_number.upper() + "|" else: content += "|" + line.document_number.upper() + "||" - content += line.document_type.name + "|" + content += line.document_type.code + "|" content += line.document_expedition_date.strftime("%Y%m%d") + "|" content += line.lastname.upper() + "|" if line.lastname2: From 9e5915ea6b0d9eb5455af46d9786a2335546a39f Mon Sep 17 00:00:00 2001 From: miguelpadin Date: Wed, 27 Oct 2021 10:08:52 +0200 Subject: [PATCH 2/2] [FIX] pms-l10n-es: fix document type @ traveller report (change name by code 2) --- pms_l10n_es/wizards/traveller_report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pms_l10n_es/wizards/traveller_report.py b/pms_l10n_es/wizards/traveller_report.py index 6f96de21b..9f3a6381e 100644 --- a/pms_l10n_es/wizards/traveller_report.py +++ b/pms_l10n_es/wizards/traveller_report.py @@ -101,7 +101,7 @@ class TravellerReport(models.TransientModel): for line in lines: content += "2" # [P|N|..] - if line.document_type.name != "D": + if line.document_type.code != "D": content += "||" + line.document_number.upper() + "|" else: content += "|" + line.document_number.upper() + "||"