diff --git a/pms/controllers/pms_portal.py b/pms/controllers/pms_portal.py index 54ed8a2bb..e6bd85914 100644 --- a/pms/controllers/pms_portal.py +++ b/pms/controllers/pms_portal.py @@ -110,7 +110,7 @@ class PortalFolio(CustomerPortal): return request.render("pms.folio_portal_template", values) @http.route( - ["/my/folios/precheckin/"], type="http", auth="user", website=True + ["/my/folios//precheckin"], type="http", auth="user", website=True ) def portal_my_folio_precheckin( self, folio_id, access_token=None, report_type=None, download=False, **kw @@ -123,13 +123,6 @@ class PortalFolio(CustomerPortal): ) except (AccessError, MissingError): return request.redirect("/my") - if report_type in ("html", "pdf", "text"): - return self._show_report( - model=folio_sudo, - report_type=report_type, - report_ref="pms.action_report_folio", - download=download, - ) values = self._folio_get_page_view_values(folio_sudo, access_token, **kw) return request.render("pms.portal_my_folio_precheckin", values) diff --git a/pms/models/pms_folio.py b/pms/models/pms_folio.py index 81d327657..0094dcb2b 100644 --- a/pms/models/pms_folio.py +++ b/pms/models/pms_folio.py @@ -770,40 +770,12 @@ class PmsFolio(models.Model): # else: # raise UserError(_("Some reservations have different currency")) - is_checkin = fields.Boolean(default=False) + # is_checkin = fields.Boolean() def _compute_access_url(self): super(PmsFolio, self)._compute_access_url() - print(self.is_checkin) for folio in self: folio.access_url = "/my/folios/%s" % (folio.id) - if self.is_checkin: - folio.access_url = "/my/folios/precheckin/%s" % (folio.id) - self.is_checkin = False - - - def get_portal_url( - self, - suffix=None, - report_type=None, - download=None, - query_string=None, - anchor=None, - bol=None, - ): - self.ensure_one() - if bol: - self.is_checkin = True - - url = self.access_url + '%s?access_token=%s%s%s%s%s' % ( - suffix if suffix else '', - self._portal_ensure_token(), - '&report_type=%s' % report_type if report_type else '', - '&download=true' if download else '', - query_string if query_string else '', - '#%s' % anchor if anchor else '' - ) - return url @api.depends("state", "sale_line_ids.invoice_status") def _compute_get_invoice_status(self): diff --git a/pms/views/folio_portal_templates.xml b/pms/views/folio_portal_templates.xml index 34fe59bdb..a2d4c20d2 100644 --- a/pms/views/folio_portal_templates.xml +++ b/pms/views/folio_portal_templates.xml @@ -64,7 +64,7 @@ Precheckin @@ -488,7 +488,8 @@ Precheckins -

There are currently no reservations in this folio for your account.

+

There are currently no reservations in this folio for your account.

@@ -499,20 +500,21 @@ - Reservation: + Reservation: + t-att-href="reservation.get_portal_url()" + t-att-title="reservation.name" + > + t-foreach="reservation.checkin_partner_ids" + t-as="checkin_partner" + > @@ -521,15 +523,15 @@
+ class="col-form-label" + for="name" + >Name: + type="text" + name="name" + t-attf-class="form-control" + t-att-value="name or checkin_partner.name" + />