mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP] Add error handling
This commit is contained in:
@@ -115,6 +115,13 @@ class PortalFolio(CustomerPortal):
|
||||
def portal_my_folio_precheckin(
|
||||
self, folio_id, access_token=None, report_type=None, download=False, **kw
|
||||
):
|
||||
values = self._prepare_portal_layout_values()
|
||||
values.update(
|
||||
{
|
||||
"error": {},
|
||||
"error_message": [],
|
||||
}
|
||||
)
|
||||
try:
|
||||
folio_sudo = self._document_check_access(
|
||||
"pms.folio",
|
||||
@@ -123,7 +130,7 @@ class PortalFolio(CustomerPortal):
|
||||
)
|
||||
except (AccessError, MissingError):
|
||||
return request.redirect("/my")
|
||||
values = self._folio_get_page_view_values(folio_sudo, access_token, **kw)
|
||||
values.update(self._folio_get_page_view_values(folio_sudo, access_token, **kw))
|
||||
values.update({"no_breadcrumbs": True})
|
||||
return request.render("pms.portal_my_folio_precheckin", values)
|
||||
|
||||
@@ -304,20 +311,71 @@ class PortalPrecheckin(CustomerPortal):
|
||||
return request.render("pms.portal_my_precheckin_detail", values)
|
||||
|
||||
@http.route(["/my/precheckin"], type="http", auth="user", website=True, csrf=False)
|
||||
def portal_precheckin_submit(self, **kw):
|
||||
checkin_partner = request.env["pms.checkin.partner"].browse(int(kw.get("id")))
|
||||
if not checkin_partner.partner_id:
|
||||
ResPartner = request.env["res.partner"]
|
||||
res_partner = ResPartner.create(kw)
|
||||
kw.update(
|
||||
def portal_precheckin_submit(self, access_token=None, **kw):
|
||||
|
||||
values = dict()
|
||||
values.update(
|
||||
{
|
||||
"error": {},
|
||||
"error_message": [],
|
||||
}
|
||||
)
|
||||
if kw:
|
||||
error, error_message = self.form_validate(kw)
|
||||
values.update(
|
||||
{
|
||||
"partner_id": res_partner.id,
|
||||
"error": error,
|
||||
"error_message": error_message,
|
||||
}
|
||||
)
|
||||
else:
|
||||
res_partner = checkin_partner.partner_id
|
||||
res_partner.write(kw)
|
||||
checkin_partner.write(kw)
|
||||
if not error:
|
||||
values = kw
|
||||
checkin_partner = request.env["pms.checkin.partner"].browse(
|
||||
int(kw.get("id"))
|
||||
)
|
||||
if not values.get("birthdate_date"):
|
||||
values.update({"birthdate_date": False})
|
||||
if not values.get("document_expedition_date"):
|
||||
values.update({"document_expedition_date": False})
|
||||
lastname = True if values.get("lastname") else False
|
||||
firstname = True if values.get("firstname") else False
|
||||
lastname2 = True if values.get("lastname2") else False
|
||||
if not checkin_partner.partner_id and (
|
||||
lastname or firstname or lastname2
|
||||
):
|
||||
ResPartner = request.env["res.partner"]
|
||||
res_partner = ResPartner.create(values)
|
||||
values.update(
|
||||
{
|
||||
"partner_id": res_partner.id,
|
||||
}
|
||||
)
|
||||
elif checkin_partner.partner_id:
|
||||
res_partner = checkin_partner.partner_id
|
||||
res_partner.write(values)
|
||||
checkin_partner.write(values)
|
||||
values1 = dict()
|
||||
values1.update(
|
||||
{
|
||||
"success": True,
|
||||
"checkin_partner": checkin_partner,
|
||||
"no_breadcrumbs": True,
|
||||
}
|
||||
)
|
||||
return request.render("pms.portal_my_precheckin_detail", values1)
|
||||
try:
|
||||
checkin_partner = request.env["pms.checkin.partner"].browse(
|
||||
int(kw.get("id"))
|
||||
)
|
||||
values.update(
|
||||
{
|
||||
"checkin_partner": checkin_partner,
|
||||
"no_breadcrumbs": True,
|
||||
}
|
||||
)
|
||||
return request.render("pms.portal_my_precheckin_detail", values)
|
||||
except (AccessError, MissingError):
|
||||
return request.redirect("/my")
|
||||
|
||||
@http.route(
|
||||
["/my/precheckin/folio_reservation"],
|
||||
@@ -328,15 +386,16 @@ class PortalPrecheckin(CustomerPortal):
|
||||
)
|
||||
def portal_precheckin_folio_submit(self, **kw):
|
||||
counter = 1
|
||||
checkin_partners = False
|
||||
if kw.get("folio_id"):
|
||||
folio = request.env["pms.folio"].browse(int(kw.get("folio_id")))
|
||||
checkin_partners = len(folio.checkin_partner_ids)
|
||||
checkin_partners = folio.checkin_partner_ids
|
||||
elif kw.get("reservation_id"):
|
||||
reservation = request.env["pms.reservation"].browse(
|
||||
int(kw.get("reservation_id"))
|
||||
)
|
||||
checkin_partners = len(reservation.checkin_partner_ids)
|
||||
for _checkin in range(checkin_partners):
|
||||
checkin_partners = reservation.checkin_partner_ids
|
||||
for checkin in checkin_partners:
|
||||
values = {
|
||||
"firstname": kw.get("firstname-" + str(counter)),
|
||||
"lastname": kw.get("lastname-" + str(counter)),
|
||||
@@ -355,14 +414,10 @@ class PortalPrecheckin(CustomerPortal):
|
||||
"mobile": kw.get("mobile-" + str(counter)),
|
||||
"email": kw.get("email-" + str(counter)),
|
||||
}
|
||||
checkin_partner_id = int(kw.get("id-" + str(counter)))
|
||||
checkin_partner = request.env["pms.checkin.partner"].browse(
|
||||
checkin_partner_id
|
||||
)
|
||||
lastname = True if kw.get("lastname-" + str(counter)) else False
|
||||
firstname = True if kw.get("firstname-" + str(counter)) else False
|
||||
lastname2 = True if kw.get("lastname2-" + str(counter)) else False
|
||||
if not checkin_partner.partner_id and (lastname or firstname or lastname2):
|
||||
if not checkin.partner_id and (lastname or firstname or lastname2):
|
||||
ResPartner = request.env["res.partner"]
|
||||
res_partner = ResPartner.create(values)
|
||||
values.update(
|
||||
@@ -370,8 +425,16 @@ class PortalPrecheckin(CustomerPortal):
|
||||
"partner_id": res_partner.id,
|
||||
}
|
||||
)
|
||||
elif checkin_partner.partner_id:
|
||||
res_partner = checkin_partner.partner_id
|
||||
elif checkin.partner_id:
|
||||
res_partner = checkin.partner_id
|
||||
res_partner.write(values)
|
||||
checkin_partner.write(values)
|
||||
checkin.write(values)
|
||||
counter = counter + 1
|
||||
|
||||
def form_validate(self, data):
|
||||
error = dict()
|
||||
error_message = []
|
||||
if not data["mobile"]:
|
||||
error["mobile"] = "error"
|
||||
error_message.append(_("Mobile is missing."))
|
||||
return error, error_message
|
||||
|
||||
@@ -4,6 +4,12 @@
|
||||
<t t-call="portal.portal_layout">
|
||||
<t t-set="additional_title">Contact Details</t>
|
||||
<form action="/my/precheckin" method="post">
|
||||
<div t-if="error_message" class="alert alert-danger" role="alert">
|
||||
<t t-foreach="error_message" t-as="err"><t t-esc="err" /><br /></t>
|
||||
</div>
|
||||
<div t-if="success" class="alert alert-success" role="alert">
|
||||
<span>Data saved successfully!</span>
|
||||
</div>
|
||||
<div class="row o_portal_details">
|
||||
<div t-attf-class="form-group col-xl-6 d-none">
|
||||
<input
|
||||
@@ -13,154 +19,145 @@
|
||||
t-att-value="id or checkin_partner.id"
|
||||
/>
|
||||
|
||||
</div>
|
||||
<div class="col-lg-8">
|
||||
<div class="row">
|
||||
<div t-attf-class="form-group col-xl-6">
|
||||
<label
|
||||
</div>
|
||||
<div class="col-lg-12">
|
||||
<div class="row">
|
||||
<div t-attf-class="form-group col-xl-6">
|
||||
<label
|
||||
class="col-form-label"
|
||||
for="firstname"
|
||||
>Name</label>
|
||||
<input
|
||||
<input
|
||||
type="text"
|
||||
name="firstname"
|
||||
t-attf-class="form-control"
|
||||
t-att-value="firstname or checkin_partner.firstname"
|
||||
/>
|
||||
</div>
|
||||
<div t-attf-class="form-group col-xl-6">
|
||||
<label
|
||||
</div>
|
||||
<div t-attf-class="form-group col-xl-6">
|
||||
<label
|
||||
class="col-form-label"
|
||||
for="lastname"
|
||||
>Lastname</label>
|
||||
<input
|
||||
<input
|
||||
type="text"
|
||||
name="lastname"
|
||||
t-attf-class="form-control"
|
||||
t-att-value="lastname or checkin_partner.lastname"
|
||||
/>
|
||||
</div>
|
||||
<div t-attf-class="form-group col-xl-6">
|
||||
<label
|
||||
</div>
|
||||
<div t-attf-class="form-group col-xl-6">
|
||||
<label
|
||||
class="col-form-label"
|
||||
for="lastname2"
|
||||
> Second Lastname</label>
|
||||
<input
|
||||
<input
|
||||
type="text"
|
||||
name="lastname2"
|
||||
t-attf-class="form-control"
|
||||
t-att-value="lastname2 or checkin_partner.lastname2"
|
||||
/>
|
||||
</div>
|
||||
<div t-attf-class="form-group col-xl-6">
|
||||
<label
|
||||
</div>
|
||||
<div t-attf-class="form-group col-xl-6">
|
||||
<label
|
||||
class="col-form-label"
|
||||
for="birthdate_date"
|
||||
> Birth Date</label>
|
||||
<input
|
||||
<input
|
||||
type="date"
|
||||
name="birthdate_date"
|
||||
t-attf-class="form-control"
|
||||
t-att-value="birth_date or checkin_partner.birthdate_date"
|
||||
/>
|
||||
</div>
|
||||
<div t-attf-class="form-group col-xl-6">
|
||||
<label
|
||||
</div>
|
||||
<div t-attf-class="form-group col-xl-6">
|
||||
<label
|
||||
class="col-form-label"
|
||||
for="gender"
|
||||
>Gender</label>
|
||||
<select
|
||||
<select
|
||||
class="form-control"
|
||||
id="gender"
|
||||
name="gender"
|
||||
t-att-value="gender or checkin_partner.gender"
|
||||
>
|
||||
<option value="female">Female</option>
|
||||
<option value="male">Male</option>
|
||||
<option value="other">Other</option>
|
||||
</select>
|
||||
</div>
|
||||
<div t-attf-class="form-group col-xl-6">
|
||||
<label
|
||||
<option value="female">Female</option>
|
||||
<option value="male">Male</option>
|
||||
<option value="other">Other</option>
|
||||
</select>
|
||||
</div>
|
||||
<div t-attf-class="form-group col-xl-6">
|
||||
<label
|
||||
class="col-form-label"
|
||||
for="document_type"
|
||||
>Doc. type</label>
|
||||
<select
|
||||
<select
|
||||
class="form-control"
|
||||
id="doc_type_id"
|
||||
name="document_type"
|
||||
t-att-value="document_type or checkin_partner.document_type"
|
||||
>
|
||||
<option value="D">DNI</option>
|
||||
<option value="C">Driving License</option>
|
||||
<option
|
||||
value="I"
|
||||
>Identification Document</option>
|
||||
<option
|
||||
value="N"
|
||||
>Spanish residence permit</option>
|
||||
<option
|
||||
value="X"
|
||||
>European residence permit</option>
|
||||
</select>
|
||||
</div>
|
||||
<div t-attf-class="form-group col-xl-6">
|
||||
<label
|
||||
<option value="D">DNI</option>
|
||||
<option value="C">Driving License</option>
|
||||
<option value="I">Identification Document</option>
|
||||
<option value="N">Spanish residence permit</option>
|
||||
<option value="X">European residence permit</option>
|
||||
</select>
|
||||
</div>
|
||||
<div t-attf-class="form-group col-xl-6">
|
||||
<label
|
||||
class="col-form-label"
|
||||
for="document_number"
|
||||
>Doc. number</label>
|
||||
<input
|
||||
<input
|
||||
type="text"
|
||||
name="document_number"
|
||||
t-attf-class="form-control"
|
||||
t-att-value="doc_number or checkin_partner.document_number"
|
||||
/>
|
||||
</div>
|
||||
<div t-attf-class="form-group col-xl-6">
|
||||
<label
|
||||
</div>
|
||||
<div t-attf-class="form-group col-xl-6">
|
||||
<label
|
||||
class="col-form-label"
|
||||
for="document_expedition_date"
|
||||
>Doc. expedition date</label>
|
||||
<input
|
||||
<input
|
||||
type="date"
|
||||
name="document_expedition_date"
|
||||
t-attf-class="form-control"
|
||||
t-att-value="doc_exp_date or checkin_partner.document_expedition_date"
|
||||
/>
|
||||
</div>
|
||||
<div t-attf-class="form-group col-xl-6">
|
||||
<label
|
||||
</div>
|
||||
<div t-attf-class="form-group col-xl-6">
|
||||
<label
|
||||
class="col-form-label"
|
||||
for="mobile"
|
||||
>Mobile</label>
|
||||
<input
|
||||
<input
|
||||
type="number"
|
||||
name="mobile"
|
||||
t-attf-class="form-control"
|
||||
t-att-value="mobile or checkin_partner.mobile"
|
||||
/>
|
||||
</div>
|
||||
<div t-attf-class="form-group col-xl-6">
|
||||
<label
|
||||
class="col-form-label"
|
||||
for="email"
|
||||
>Email</label>
|
||||
<input
|
||||
</div>
|
||||
<div t-attf-class="form-group col-xl-6">
|
||||
<label class="col-form-label" for="email">Email</label>
|
||||
<input
|
||||
type="email"
|
||||
name="email"
|
||||
t-attf-class="form-control"
|
||||
t-att-value="email or checkin_partner.email"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix">
|
||||
<button type="submit" class="btn btn-primary float-right mb32 ">
|
||||
Confirm
|
||||
<span class="fa fa-long-arrow-right" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix">
|
||||
<button type="submit" class="btn btn-primary float-right mb32 ">
|
||||
Confirm
|
||||
<span class="fa fa-long-arrow-right" />
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</t>
|
||||
</template>
|
||||
@@ -179,26 +176,26 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<t t-set="count" t-value="0" />
|
||||
<t t-set="count" t-value="0" />
|
||||
<form
|
||||
class="collapse"
|
||||
action="/my/precheckin/folio_reservation"
|
||||
method="get"
|
||||
>
|
||||
<t
|
||||
<t
|
||||
t-foreach="reservation.checkin_partner_ids"
|
||||
t-as="checkin_partner"
|
||||
>
|
||||
<t t-set="id1" t-value="'counter'+ str(count)" />
|
||||
<t t-set="id2" t-value="'#'" />
|
||||
<t t-set="id3" t-value="id2+id1" />
|
||||
<t t-set="idcheckin" t-value="'checkin' + str(count)" />
|
||||
<t t-set="count" t-value="count+1" />
|
||||
<t t-set="id1" t-value="'counter'+ str(count)" />
|
||||
<t t-set="id2" t-value="'#'" />
|
||||
<t t-set="id3" t-value="id2+id1" />
|
||||
<t t-set="idcheckin" t-value="'checkin' + str(count)" />
|
||||
<t t-set="count" t-value="count+1" />
|
||||
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<a t-att-href="checkin_partner.get_portal_url()">
|
||||
Checkin <t t-esc="count" />
|
||||
Checkin <t t-esc="count" />
|
||||
</a>
|
||||
<a
|
||||
data-toggle="collapse"
|
||||
@@ -208,199 +205,174 @@
|
||||
<span class="fa fa-chevron-down fa-sm" />
|
||||
</a>
|
||||
|
||||
<div class="row o_portal_details">
|
||||
<div class="col-lg-8">
|
||||
<div
|
||||
class="row collapse"
|
||||
t-att-id="id1"
|
||||
>
|
||||
<div
|
||||
t-attf-class="form-group col-xl-6"
|
||||
>
|
||||
<label
|
||||
<div class="row o_portal_details">
|
||||
<div class="col-lg-8">
|
||||
<div class="row collapse" t-att-id="id1">
|
||||
<div t-attf-class="form-group col-xl-6">
|
||||
<label
|
||||
class="col-form-label"
|
||||
for="firstname"
|
||||
>Name</label>
|
||||
<input
|
||||
<input
|
||||
type="text"
|
||||
t-att-name="'firstname-' + str(count)"
|
||||
t-attf-class="form-control"
|
||||
t-att-value="firstname or checkin_partner.firstname"
|
||||
t-att-id="idcheckin"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
t-attf-class="form-group col-xl-6"
|
||||
>
|
||||
<label
|
||||
</div>
|
||||
<div t-attf-class="form-group col-xl-6">
|
||||
<label
|
||||
class="col-form-label"
|
||||
for="lastname"
|
||||
>Lastname</label>
|
||||
<input
|
||||
<input
|
||||
type="text"
|
||||
t-att-name="'lastname-' + str(count)"
|
||||
t-attf-class="form-control"
|
||||
t-att-value="lastname or checkin_partner.lastname"
|
||||
t-att-id="idcheckin"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
t-attf-class="form-group col-xl-6"
|
||||
>
|
||||
<label
|
||||
</div>
|
||||
<div t-attf-class="form-group col-xl-6">
|
||||
<label
|
||||
class="col-form-label"
|
||||
for="lastname2"
|
||||
> Second Lastname</label>
|
||||
<input
|
||||
<input
|
||||
type="text"
|
||||
t-att-name="'lastname2-' + str(count)"
|
||||
t-attf-class="form-control"
|
||||
t-att-value="lastname2 or checkin_partner.lastname2"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
t-attf-class="form-group col-xl-6"
|
||||
>
|
||||
<label
|
||||
</div>
|
||||
<div t-attf-class="form-group col-xl-6">
|
||||
<label
|
||||
class="col-form-label"
|
||||
for="birthdate_date"
|
||||
> Birth Date</label>
|
||||
<input
|
||||
<input
|
||||
type="date"
|
||||
t-att-name="'birthdate_date-'+ str(count)"
|
||||
t-attf-class="form-control"
|
||||
t-att-value="birthdate_date or checkin_partner.birthdate_date"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
t-attf-class="form-group col-xl-6"
|
||||
>
|
||||
<label
|
||||
</div>
|
||||
<div t-attf-class="form-group col-xl-6">
|
||||
<label
|
||||
class="col-form-label"
|
||||
for="gender"
|
||||
>Gender</label>
|
||||
<select
|
||||
<select
|
||||
class="form-control"
|
||||
id="gender"
|
||||
t-att-name="'gender-'+ str(count)"
|
||||
t-att-value="gender or checkin_partner.gender"
|
||||
>
|
||||
<option
|
||||
<option
|
||||
value="female"
|
||||
>Female</option>
|
||||
<option
|
||||
<option
|
||||
value="male"
|
||||
>Male</option>
|
||||
<option
|
||||
<option
|
||||
value="other"
|
||||
>Other</option>
|
||||
</select>
|
||||
</div>
|
||||
<div
|
||||
t-attf-class="form-group col-xl-6"
|
||||
>
|
||||
<label
|
||||
</select>
|
||||
</div>
|
||||
<div t-attf-class="form-group col-xl-6">
|
||||
<label
|
||||
class="col-form-label"
|
||||
for="document_type"
|
||||
>Doc. type</label>
|
||||
<select
|
||||
<select
|
||||
class="form-control"
|
||||
id="doc_type_id"
|
||||
t-att-name="'document_type-'+ str(count)"
|
||||
t-att-value="document_type or checkin_partner.document_type"
|
||||
>
|
||||
<option
|
||||
value="D"
|
||||
>DNI</option>
|
||||
<option
|
||||
<option value="D">DNI</option>
|
||||
<option
|
||||
value="C"
|
||||
>Driving License</option>
|
||||
<option
|
||||
<option
|
||||
value="I"
|
||||
>Identification Document</option>
|
||||
<option
|
||||
<option
|
||||
value="N"
|
||||
>Spanish residence permit</option>
|
||||
<option
|
||||
<option
|
||||
value="X"
|
||||
>European residence permit</option>
|
||||
</select>
|
||||
</div>
|
||||
<div
|
||||
t-attf-class="form-group col-xl-6"
|
||||
>
|
||||
<label
|
||||
</select>
|
||||
</div>
|
||||
<div t-attf-class="form-group col-xl-6">
|
||||
<label
|
||||
class="col-form-label"
|
||||
for="document_number"
|
||||
>Doc. number</label>
|
||||
<input
|
||||
<input
|
||||
type="text"
|
||||
t-att-name="'document_number-'+ str(count)"
|
||||
t-attf-class="form-control"
|
||||
t-att-value="document_number or checkin_partner.document_number"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
t-attf-class="form-group col-xl-6"
|
||||
>
|
||||
<label
|
||||
</div>
|
||||
<div t-attf-class="form-group col-xl-6">
|
||||
<label
|
||||
class="col-form-label"
|
||||
for="document_expedition_date"
|
||||
>Doc. expedition date</label>
|
||||
<input
|
||||
<input
|
||||
type="date"
|
||||
t-att-name="'document_expedition_date-'+ str(count)"
|
||||
t-attf-class="form-control"
|
||||
t-att-value="document_expedition_date or checkin_partner.document_expedition_date"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
t-attf-class="form-group col-xl-6"
|
||||
>
|
||||
<label
|
||||
</div>
|
||||
<div t-attf-class="form-group col-xl-6">
|
||||
<label
|
||||
class="col-form-label"
|
||||
for="mobile"
|
||||
>Mobile</label>
|
||||
<input
|
||||
<input
|
||||
type="number"
|
||||
t-att-name="'mobile-'+ str(count)"
|
||||
t-attf-class="form-control"
|
||||
t-att-value="mobile or checkin_partner.mobile"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
t-attf-class="form-group col-xl-6"
|
||||
>
|
||||
<label
|
||||
</div>
|
||||
<div t-attf-class="form-group col-xl-6">
|
||||
<label
|
||||
class="col-form-label"
|
||||
for="email"
|
||||
>Email</label>
|
||||
<input
|
||||
<input
|
||||
type="email"
|
||||
t-att-name="'email-'+ str(count)"
|
||||
t-attf-class="form-control"
|
||||
t-att-value="email or checkin_partner.email"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
</div>
|
||||
<div
|
||||
t-attf-class="form-group col-xl-6 d-none"
|
||||
>
|
||||
<input
|
||||
<input
|
||||
type="text"
|
||||
t-att-name="'id-'+ str(count)"
|
||||
t-attf-class="form-control"
|
||||
t-att-value="id or checkin_partner.id"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</t>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</t>
|
||||
|
||||
<div t-attf-class="form-group col-xl-6 d-none">
|
||||
<input
|
||||
<input
|
||||
type="text"
|
||||
t-att-name="'reservation_id'"
|
||||
t-attf-class="form-control"
|
||||
@@ -423,9 +395,9 @@
|
||||
</form>
|
||||
</tbody>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
<template id="portal_my_folio_precheckin" name="Precheckin Folio">
|
||||
<template id="portal_my_folio_precheckin" name="Precheckin Folio">
|
||||
<t t-call="portal.portal_layout">
|
||||
<t t-if="not folio.reservation_ids">
|
||||
<p
|
||||
@@ -474,16 +446,18 @@
|
||||
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<a t-att-href="checkin_partner.get_portal_url()">
|
||||
<a
|
||||
t-att-href="checkin_partner.get_portal_url()"
|
||||
>
|
||||
Checkin <t t-esc="count_reservation" />
|
||||
</a>
|
||||
</a>
|
||||
<a
|
||||
data-toggle="collapse"
|
||||
t-att-data-target="id3"
|
||||
class="text-primary"
|
||||
>
|
||||
<span class="fa fa-chevron-down fa-sm" />
|
||||
</a>
|
||||
<span class="fa fa-chevron-down fa-sm" />
|
||||
</a>
|
||||
<div class="row o_portal_details">
|
||||
<div class="col-lg-8">
|
||||
<div
|
||||
@@ -600,7 +574,7 @@
|
||||
<option
|
||||
value="X"
|
||||
>European residence permit</option>
|
||||
</select>
|
||||
</select>
|
||||
</div>
|
||||
<div
|
||||
t-attf-class="form-group col-xl-6"
|
||||
@@ -676,13 +650,13 @@
|
||||
</t>
|
||||
</t>
|
||||
<div t-attf-class="form-group col-xl-6 d-none">
|
||||
<input
|
||||
<input
|
||||
type="text"
|
||||
t-att-name="'folio_id'"
|
||||
t-attf-class="form-control"
|
||||
t-att-value="folio_id or folio.id"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="clearfix">
|
||||
@@ -699,11 +673,6 @@
|
||||
</form>
|
||||
</tbody>
|
||||
</t>
|
||||
</t>
|
||||
<script>
|
||||
function myFunction(){
|
||||
window.prompt('Checkinssssss!');
|
||||
}
|
||||
</script>
|
||||
</t>
|
||||
</template>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user