From 0c973cb36bda4fe9d3665ac9b0632f50e5532761 Mon Sep 17 00:00:00 2001 From: braisab Date: Thu, 10 Mar 2022 20:32:44 +0100 Subject: [PATCH] [IMP]pms: added new checkin partner fields in precheckin portal --- pms/tests/test_pms_checkin_partner.py | 11 +- pms/views/precheckin_portal_templates.xml | 177 ++++++++++++++++++++++ 2 files changed, 181 insertions(+), 7 deletions(-) diff --git a/pms/tests/test_pms_checkin_partner.py b/pms/tests/test_pms_checkin_partner.py index 48ce2bca8..9bbef0d48 100644 --- a/pms/tests/test_pms_checkin_partner.py +++ b/pms/tests/test_pms_checkin_partner.py @@ -1201,7 +1201,6 @@ class TestPmsCheckinPartner(TestPms): is = 20 years old and document_date = today + 1 year. The expected expedition date has to be doc_date - 5 years """ - doc_type_id = self.env["res.partner.id_category"].search([("code", "=", "D")]) doc_date = fields.date.today() + datetime.timedelta(days=366) doc_date_str = str(doc_date) @@ -1213,7 +1212,7 @@ class TestPmsCheckinPartner(TestPms): expected_exp_date = doc_date - datetime.timedelta(days=1826.25) expedition_date = ( self.checkin1.calculate_doc_type_expedition_date_from_validity_date( - doc_type_id, doc_date_str, birthdate_str + self.id_category, doc_date_str, birthdate_str ) ) date_expedition_date = datetime.date( @@ -1238,7 +1237,6 @@ class TestPmsCheckinPartner(TestPms): is = 40 years old and document_date = today + 1 year. The expected expedition date has to be doc_date - 10 years """ - doc_type_id = self.env["res.partner.id_category"].search([("code", "=", "D")]) doc_date = fields.date.today() + datetime.timedelta(days=366) doc_date_str = str(doc_date) @@ -1250,7 +1248,7 @@ class TestPmsCheckinPartner(TestPms): expected_exp_date = doc_date - datetime.timedelta(days=3652.5) expedition_date = ( self.checkin1.calculate_doc_type_expedition_date_from_validity_date( - doc_type_id, doc_date_str, birthdate_str + self.id_category, doc_date_str, birthdate_str ) ) date_expedition_date = datetime.date( @@ -1275,7 +1273,6 @@ class TestPmsCheckinPartner(TestPms): is = 20 years old and document_date = today + 1 year. The expected expedition date has to be doc_date - 5 years """ - doc_type_id = self.env["res.partner.id_category"].search([("code", "=", "P")]) doc_date = fields.date.today() + datetime.timedelta(days=366) doc_date_str = str(doc_date) @@ -1287,7 +1284,7 @@ class TestPmsCheckinPartner(TestPms): expected_exp_date = doc_date - datetime.timedelta(days=1826.25) expedition_date = ( self.checkin1.calculate_doc_type_expedition_date_from_validity_date( - doc_type_id, doc_date_str, birthdate_str + self.id_category, doc_date_str, birthdate_str ) ) date_expedition_date = datetime.date( @@ -1436,7 +1433,7 @@ class TestPmsCheckinPartner(TestPms): "firstname": "SerafĂ­n", "lastname": "Rivas", "lastname2": "Gonzalez", - "document_type": self.id_category.name, + "document_type": self.id_category.code, "document_number": "18038946T", "document_expedition_date": "2015-10-07", "birthdate_date": "1983-10-05", diff --git a/pms/views/precheckin_portal_templates.xml b/pms/views/precheckin_portal_templates.xml index b6aba92d7..5d6bcdb16 100644 --- a/pms/views/precheckin_portal_templates.xml +++ b/pms/views/precheckin_portal_templates.xml @@ -273,6 +273,25 @@ /> +
+ + + + + +
+
+ + +
+
+ Residence Address +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
@@ -410,8 +526,69 @@ from {top: 100px; opacity: 1;} to {top: 0; opacity: 0;} } + + .placeholder-class{ + display: block; + width: 100%; + height: calc(1.5em + 0.75rem + 2px); + padding: 0.375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.5; + color: grey; + background-color: #FFFFFF; + background-clip: padding-box; + border: 1px solid #CED4DA; + border-radius: 0.25rem; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + }