mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP]: added access restriction to precheckin when it has already been completed
This commit is contained in:
@@ -337,10 +337,9 @@ class PortalPrecheckin(CustomerPortal):
|
||||
"checkin_pos": 0,
|
||||
}
|
||||
)
|
||||
if checkin_partner.state == "draft" or checkin_partner.state == "confirm":
|
||||
return request.render("pms.portal_my_reservation_precheckin", values)
|
||||
else:
|
||||
if checkin_partner.state != "draft":
|
||||
return request.render("pms.portal_not_checkin", values)
|
||||
return request.render("pms.portal_my_reservation_precheckin", values)
|
||||
|
||||
@http.route(
|
||||
["/my/precheckin/<int:folio_id>/checkin/<int:checkin_partner_id>"],
|
||||
@@ -399,8 +398,9 @@ class PortalPrecheckin(CustomerPortal):
|
||||
values.update(
|
||||
self._precheckin_get_page_view_values(checkin_partner_id.id, access_token)
|
||||
)
|
||||
|
||||
values.update({"no_breadcrumbs": True})
|
||||
if checkin_partner_id.state != "draft":
|
||||
return request.render("pms.portal_not_checkin", values)
|
||||
return request.render("pms.portal_my_precheckin_detail", values)
|
||||
|
||||
@http.route(
|
||||
|
||||
@@ -317,7 +317,7 @@
|
||||
</t>
|
||||
</div>
|
||||
|
||||
<div class="col-4 pt-3">
|
||||
<div id="pager_count" class="col-4 pt-3">
|
||||
<center>
|
||||
Page
|
||||
<span t-esc="int(checkin_pos) + 1" />
|
||||
@@ -1079,11 +1079,9 @@
|
||||
<template id="portal_not_checkin" name="Not Checkin">
|
||||
<t t-call="portal.portal_layout">
|
||||
<center>
|
||||
The quick registration system is not available because the date of your reservation has already passed.<br
|
||||
/>
|
||||
If you have any questions, you can contact us by phone: <span><t
|
||||
t-esc="folio.pms_property_id.phone"
|
||||
/></span> or by email: <span><t
|
||||
The quick registration system is not available.<br />
|
||||
If you have any questions, you can contact us: <br /><br />Phone: <span
|
||||
><t t-esc="folio.pms_property_id.phone" /></span> <br /> Email: <span><t
|
||||
t-esc="folio.pms_property_id.email"
|
||||
/></span>
|
||||
</center>
|
||||
|
||||
Reference in New Issue
Block a user