From 6de69e01fb9ad790d7142943cbb5844df6958be3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Lodeiros?= Date: Mon, 14 Nov 2022 17:51:21 +0100 Subject: [PATCH] [FIX]pms: access portal precheckin --- pms/controllers/pms_portal.py | 8 +++++--- pms/views/precheckin_portal_templates.xml | 15 +++++++++------ 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/pms/controllers/pms_portal.py b/pms/controllers/pms_portal.py index c0e6c27ba..f38486067 100644 --- a/pms/controllers/pms_portal.py +++ b/pms/controllers/pms_portal.py @@ -416,15 +416,17 @@ class PortalPrecheckin(CustomerPortal): ) def portal_precheckin_invitation(self, folio_id, access_token=None, **kw): try: - folio_sudo = self._document_check_access( + folio_sudo = self.sudo()._document_check_access( "pms.folio", folio_id, access_token=access_token, ) except (AccessError, MissingError): return request.redirect("/my") - web_url = request.env["ir.config_parameter"].search( - [("key", "=", "web.base.url")] + web_url = ( + request.env["ir.config_parameter"] + .sudo() + .search([("key", "=", "web.base.url")]) ) values = self._folio_get_page_view_values(folio_sudo, access_token, **kw) values.update({"no_breadcrumbs": True, "error": {}, "web_url": web_url.value}) diff --git a/pms/views/precheckin_portal_templates.xml b/pms/views/precheckin_portal_templates.xml index 99ecb83a9..f3093aa0d 100644 --- a/pms/views/precheckin_portal_templates.xml +++ b/pms/views/precheckin_portal_templates.xml @@ -650,12 +650,12 @@ > your passage through reception will be much faster, being able to enjoy the comfort of your room right away.
-
- -
+
If you wish, you can share with the rest of the guests the access to their check-in so that they can fill it out. - + - +