From c9bd90772d62e39219195992ab465b4e07255d61 Mon Sep 17 00:00:00 2001 From: braisab Date: Fri, 15 Oct 2021 18:57:41 +0200 Subject: [PATCH] [FIX]pms: Fixed calculation of expedition_date from reservation and folio in portal --- pms/controllers/pms_portal.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pms/controllers/pms_portal.py b/pms/controllers/pms_portal.py index 7b59e97d4..266ce782a 100644 --- a/pms/controllers/pms_portal.py +++ b/pms/controllers/pms_portal.py @@ -261,6 +261,16 @@ class PortalReservation(CustomerPortal): reservation_sudo, access_token, **kw ) values.update({"no_breadcrumbs": True, "error": {}}) + country_ids = request.env["res.country"].search([]) + state_ids = request.env["res.country.state"].search([]) + doc_type_ids = request.env["res.partner.id_category"].sudo().search([]) + values.update( + { + "country_ids": country_ids, + "state_ids": state_ids, + "doc_type_ids": doc_type_ids, + } + ) return request.render("pms.portal_my_reservation_precheckin", values) @@ -345,7 +355,7 @@ class PortalPrecheckin(CustomerPortal): ) values.update( { - "document_type": doc_type, + "document_type": doc_type.id, } ) request.env["pms.checkin.partner"].sudo()._save_data_from_portal( @@ -432,7 +442,7 @@ class PortalPrecheckin(CustomerPortal): ) values.update( { - "document_type": doc_type, + "document_type": doc_type.id, } ) error, error_message = self.form_validate(kw, counter)