mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP] added input alert if has error and fix document number input
This commit is contained in:
@@ -416,11 +416,10 @@ class PortalPrecheckin(CustomerPortal):
|
|||||||
"email": kw.get("email-" + str(counter)),
|
"email": kw.get("email-" + str(counter)),
|
||||||
}
|
}
|
||||||
error, error_message = self.form_validate(kw, counter)
|
error, error_message = self.form_validate(kw, counter)
|
||||||
errors.update({counter: error})
|
errors.update(error)
|
||||||
if error_message:
|
if error_message:
|
||||||
for e in error_message:
|
for e in error_message:
|
||||||
e_messages.append(e)
|
e_messages.append(e)
|
||||||
|
|
||||||
has_error = True
|
has_error = True
|
||||||
else:
|
else:
|
||||||
lastname = True if kw.get("lastname-" + str(counter)) else False
|
lastname = True if kw.get("lastname-" + str(counter)) else False
|
||||||
@@ -437,28 +436,20 @@ class PortalPrecheckin(CustomerPortal):
|
|||||||
elif checkin.partner_id:
|
elif checkin.partner_id:
|
||||||
res_partner = checkin.partner_id
|
res_partner = checkin.partner_id
|
||||||
res_partner.write(values)
|
res_partner.write(values)
|
||||||
|
|
||||||
checkin.write(values)
|
checkin.write(values)
|
||||||
counter = counter + 1
|
counter = counter + 1
|
||||||
values = {"no_breadcrumbs": True}
|
values = {"no_breadcrumbs": True}
|
||||||
|
|
||||||
if has_error:
|
if has_error:
|
||||||
filtered_dict = {k: v for k, v in errors.items() if v}
|
filtered_dict = {k: v for k, v in errors.items() if v}
|
||||||
for e in filtered_dict:
|
values.update({"error": filtered_dict})
|
||||||
error = filtered_dict[e]
|
|
||||||
values.update({"error": error})
|
|
||||||
|
|
||||||
values.update(
|
values.update(
|
||||||
{
|
{
|
||||||
"error_message": e_messages,
|
"error_message": e_messages,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
values.update(
|
values.update({"success": True, "error": {}})
|
||||||
{
|
|
||||||
"success": True,
|
|
||||||
}
|
|
||||||
)
|
|
||||||
if kw.get("folio_id"):
|
if kw.get("folio_id"):
|
||||||
folio = request.env["pms.folio"].browse(int(kw.get("folio_id")))
|
folio = request.env["pms.folio"].browse(int(kw.get("folio_id")))
|
||||||
values.update(
|
values.update(
|
||||||
@@ -479,8 +470,7 @@ class PortalPrecheckin(CustomerPortal):
|
|||||||
return request.render("pms.portal_my_reservation_precheckin", values)
|
return request.render("pms.portal_my_reservation_precheckin", values)
|
||||||
|
|
||||||
def form_validate(self, data, counter):
|
def form_validate(self, data, counter):
|
||||||
error = dict()
|
error, error_message = self.form_document_validate(data, counter)
|
||||||
error_message = []
|
|
||||||
keys = data.keys()
|
keys = data.keys()
|
||||||
mobile = "mobile" if "mobile" in keys else "mobile-" + str(counter)
|
mobile = "mobile" if "mobile" in keys else "mobile-" + str(counter)
|
||||||
if data[mobile]:
|
if data[mobile]:
|
||||||
@@ -491,17 +481,71 @@ class PortalPrecheckin(CustomerPortal):
|
|||||||
):
|
):
|
||||||
error[mobile] = "error"
|
error[mobile] = "error"
|
||||||
error_message.append("Invalid phone")
|
error_message.append("Invalid phone")
|
||||||
if data["document_number"]:
|
birthdate_date = (
|
||||||
if not data["document_type"]:
|
"birthdate_date"
|
||||||
error["document_type"] = "error"
|
if "birthdate_date" in keys
|
||||||
|
else "birthdate_date-" + str(counter)
|
||||||
|
)
|
||||||
|
if data[birthdate_date] and data[birthdate_date] > str(fields.Datetime.today()):
|
||||||
|
error[birthdate_date] = "error"
|
||||||
|
error_message.append("Birthdate must be less than today")
|
||||||
|
document_expedition_date = (
|
||||||
|
"document_expedition_date"
|
||||||
|
if "document_expedition_date" in keys
|
||||||
|
else "document_expedition_date-" + str(counter)
|
||||||
|
)
|
||||||
|
if data[document_expedition_date] and data[document_expedition_date] > str(
|
||||||
|
fields.Datetime.today()
|
||||||
|
):
|
||||||
|
error[document_expedition_date] = "error"
|
||||||
|
error_message.append("Expedition Date must be less than today")
|
||||||
|
email = "email" if "email" in keys else "email-" + str(counter)
|
||||||
|
if data[email] and not tools.single_email_re.match(data[email]):
|
||||||
|
error[email] = "error"
|
||||||
|
error_message.append("Email format is wrong")
|
||||||
|
firstname = "firstname" if "firstname" in keys else "firstname-" + str(counter)
|
||||||
|
lastname = "lastname" if "lastname" in keys else "lastname-" + str(counter)
|
||||||
|
lastname2 = "lastname2" if "lastname2" in keys else "lastname2-" + str(counter)
|
||||||
|
if not data[firstname] and not data[lastname] and not data[lastname2]:
|
||||||
|
error[firstname] = "error"
|
||||||
|
error_message.append("Firstname or any lastname are not included")
|
||||||
|
return error, error_message
|
||||||
|
|
||||||
|
def form_document_validate(self, data, counter):
|
||||||
|
error = dict()
|
||||||
|
error_message = []
|
||||||
|
keys = data.keys()
|
||||||
|
document_number = (
|
||||||
|
"document_number"
|
||||||
|
if "document_number" in keys
|
||||||
|
else "document_number-" + str(counter)
|
||||||
|
)
|
||||||
|
document_type = (
|
||||||
|
"document_type"
|
||||||
|
if "document_type" in keys
|
||||||
|
else "document_type-" + str(counter)
|
||||||
|
)
|
||||||
|
checkin_partner_id = "id" if "id" in keys else "id-" + str(counter)
|
||||||
|
checkin_partner = request.env["pms.checkin.partner"].search(
|
||||||
|
[("id", "=", data[checkin_partner_id])]
|
||||||
|
)
|
||||||
|
partner_id = checkin_partner.partner_id.id
|
||||||
|
if partner_id:
|
||||||
|
partners = request.env["res.partner"].search(
|
||||||
|
[("id", "!=", str(partner_id))]
|
||||||
|
)
|
||||||
|
if data[document_number]:
|
||||||
|
for partner in partners:
|
||||||
|
if data[document_number] == partner.document_number:
|
||||||
|
error[document_number] = "error"
|
||||||
|
error_message.append("Document Number already exists")
|
||||||
|
if not data[document_type]:
|
||||||
|
error[document_type] = "error"
|
||||||
error_message.append("Document Type is not selected")
|
error_message.append("Document Type is not selected")
|
||||||
if data["document_type"] == "D":
|
if data[document_type] == "D":
|
||||||
if (
|
if len(data[document_number]) == 9 or len(data[document_number]) == 10:
|
||||||
len(data["document_number"]) == 9
|
if not re.match(r"^\d{8}[ -]?[a-zA-Z]$", data[document_number]):
|
||||||
or len(data["document_number"]) == 10
|
error[document_number] = "error"
|
||||||
):
|
|
||||||
if not re.match(r"^\d{8}[ -]?[a-zA-Z]$", data["document_number"]):
|
|
||||||
error["document_number"] = "error"
|
|
||||||
error_message.append("The DNI format is wrong")
|
error_message.append("The DNI format is wrong")
|
||||||
letters = {
|
letters = {
|
||||||
0: "T",
|
0: "T",
|
||||||
@@ -528,52 +572,32 @@ class PortalPrecheckin(CustomerPortal):
|
|||||||
21: "K",
|
21: "K",
|
||||||
22: "E",
|
22: "E",
|
||||||
}
|
}
|
||||||
dni_number = data["document_number"][0:8]
|
dni_number = data[document_number][0:8]
|
||||||
dni_letter = data["document_number"][
|
dni_letter = data[document_number][
|
||||||
len(data["document_number"]) - 1 : len(data["document_number"])
|
len(data[document_number]) - 1 : len(data[document_number])
|
||||||
]
|
]
|
||||||
if letters.get(int(dni_number) % 23) != dni_letter.upper():
|
if letters.get(int(dni_number) % 23) != dni_letter.upper():
|
||||||
error["document_number"] = "error"
|
error[document_number] = "error"
|
||||||
error_message.append("DNI is invalid")
|
error_message.append("DNI is invalid")
|
||||||
else:
|
else:
|
||||||
error["document_number"] = "error"
|
error[document_number] = "error"
|
||||||
error_message.append("DNI is invalid")
|
error_message.append("DNI is invalid")
|
||||||
if data["document_type"] == "C" and not re.match(
|
if data[document_type] == "C" and not re.match(
|
||||||
r"^\d{8}[ -]?[a-zA-Z]$", data["document_number"]
|
r"^\d{8}[ -]?[a-zA-Z]$", data[document_number]
|
||||||
):
|
):
|
||||||
error["document_number"] = "error"
|
error[document_number] = "error"
|
||||||
error_message.append("The Driving License format is wrong")
|
error_message.append("The Driving License format is wrong")
|
||||||
if data["document_type"] == "N" and not re.match(
|
if data[document_type] == "N" and not re.match(
|
||||||
r"^[X|Y]{1}[ -]?\d{7,8}[ -]?[a-zA-Z]$", data["document_number"]
|
r"^[X|Y]{1}[ -]?\d{7,8}[ -]?[a-zA-Z]$", data[document_number]
|
||||||
):
|
):
|
||||||
error["document_number"] = "error"
|
error[document_number] = "error"
|
||||||
error_message.append("The Spanish Residence Permit format is wrong")
|
error_message.append("The Spanish Residence Permit format is wrong")
|
||||||
if data["document_type"] == "X" and not re.match(
|
if data[document_type] == "X" and not re.match(
|
||||||
r"^[X|Y]{1}[ -]?\d{7,8}[ -]?[a-zA-Z]$", data["document_number"]
|
r"^[X|Y]{1}[ -]?\d{7,8}[ -]?[a-zA-Z]$", data[document_number]
|
||||||
):
|
):
|
||||||
error["document_number"] = "error"
|
error[document_number] = "error"
|
||||||
error_message.append("The European Residence Permit format is wrong")
|
error_message.append("The European Residence Permit format is wrong")
|
||||||
elif data["document_type"]:
|
elif data[document_type]:
|
||||||
error["document_number"] = "error"
|
error[document_number] = "error"
|
||||||
error_message.append("Document Number not entered")
|
error_message.append("Document Number not entered")
|
||||||
|
|
||||||
if data["birthdate_date"] and data["birthdate_date"] > str(
|
|
||||||
fields.Datetime.today()
|
|
||||||
):
|
|
||||||
error["birthdate_date"] = "error"
|
|
||||||
error_message.append("Birthdate must be less than today")
|
|
||||||
if data["document_expedition_date"] and data["document_expedition_date"] > str(
|
|
||||||
fields.Datetime.today()
|
|
||||||
):
|
|
||||||
error["document_expedition_date"] = "error"
|
|
||||||
error_message.append("Expedition Date must be less than today")
|
|
||||||
|
|
||||||
if data["email"] and not tools.single_email_re.match(data["email"]):
|
|
||||||
error["email"] = "error"
|
|
||||||
error_message.append("Email format is wrong")
|
|
||||||
|
|
||||||
if not data["firstname"] and not data["lastname"] and not data["lastname2"]:
|
|
||||||
error["firstanme"] = "error"
|
|
||||||
error_message.append("Firstname or any lastname are not included")
|
|
||||||
|
|
||||||
return error, error_message
|
return error, error_message
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
name="firstname"
|
name="firstname"
|
||||||
t-attf-class="form-control"
|
t-attf-class="form-control #{error.get('firstname') and 'is-invalid' or ''}"
|
||||||
t-att-value="firstname or checkin_partner.firstname"
|
t-att-value="firstname or checkin_partner.firstname"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
name="lastname"
|
name="lastname"
|
||||||
t-attf-class="form-control"
|
t-attf-class="form-control "
|
||||||
t-att-value="lastname or checkin_partner.lastname"
|
t-att-value="lastname or checkin_partner.lastname"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -99,7 +99,7 @@
|
|||||||
t-esc="checkin_partner.document_type"
|
t-esc="checkin_partner.document_type"
|
||||||
/></p></div>
|
/></p></div>
|
||||||
<select
|
<select
|
||||||
class="form-control"
|
t-attf-class="form-control #{error.get('document_type') and 'is-invalid' or ''}"
|
||||||
id="doc_type_id"
|
id="doc_type_id"
|
||||||
name="document_type"
|
name="document_type"
|
||||||
t-att-value="document_type or checkin_partner.document_type"
|
t-att-value="document_type or checkin_partner.document_type"
|
||||||
@@ -202,11 +202,7 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<t t-set="count" t-value="0" />
|
<t t-set="count" t-value="0" />
|
||||||
<form
|
<form action="/my/precheckin/folio_reservation" method="post">
|
||||||
class="collapse"
|
|
||||||
action="/my/precheckin/folio_reservation"
|
|
||||||
method="post"
|
|
||||||
>
|
|
||||||
<div
|
<div
|
||||||
t-if="error_message"
|
t-if="error_message"
|
||||||
class="alert alert-danger"
|
class="alert alert-danger"
|
||||||
@@ -245,58 +241,71 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="row o_portal_details">
|
<div class="row o_portal_details">
|
||||||
<div class="col-lg-8">
|
<div class="col-lg-8">
|
||||||
<div class="row collapse" t-att-id="id1">
|
<div
|
||||||
<div t-attf-class="form-group col-xl-6">
|
class="row collapse"
|
||||||
<label
|
t-att-id="id1"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
t-attf-class="form-group col-xl-6"
|
||||||
|
>
|
||||||
|
<label
|
||||||
class="col-form-label"
|
class="col-form-label"
|
||||||
for="firstname"
|
for="firstname"
|
||||||
>Name</label>
|
>Name</label>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
t-att-name="'firstname-' + str(count)"
|
t-att-name="'firstname-' + str(count)"
|
||||||
t-attf-class="form-control"
|
t-attf-class="form-control #{error.get('firstname-'+str(count)) and 'is-invalid' or ''}"
|
||||||
t-att-value="firstname or checkin_partner.firstname"
|
t-att-value="firstname or (checkin_partner.firstname)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div t-attf-class="form-group col-xl-6">
|
<div
|
||||||
<label
|
t-attf-class="form-group col-xl-6"
|
||||||
|
>
|
||||||
|
<label
|
||||||
class="col-form-label"
|
class="col-form-label"
|
||||||
for="lastname"
|
for="lastname"
|
||||||
>Lastname</label>
|
>Lastname</label>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
t-att-name="'lastname-' + str(count)"
|
t-att-name="'lastname-' + str(count)"
|
||||||
t-attf-class="form-control"
|
t-attf-class="form-control"
|
||||||
t-att-value="lastname or checkin_partner.lastname"
|
t-att-value="lastname or checkin_partner.lastname"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div t-attf-class="form-group col-xl-6">
|
<div
|
||||||
<label
|
t-attf-class="form-group col-xl-6"
|
||||||
|
>
|
||||||
|
<label
|
||||||
class="col-form-label"
|
class="col-form-label"
|
||||||
for="lastname2"
|
for="lastname2"
|
||||||
> Second Lastname</label>
|
> Second Lastname</label>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
t-att-name="'lastname2-' + str(count)"
|
t-att-name="'lastname2-' + str(count)"
|
||||||
t-attf-class="form-control"
|
t-attf-class="form-control"
|
||||||
t-att-value="lastname2 or checkin_partner.lastname2"
|
t-att-value="lastname2 or checkin_partner.lastname2"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div t-attf-class="form-group col-xl-6">
|
<div
|
||||||
<label
|
t-attf-class="form-group col-xl-6"
|
||||||
|
>
|
||||||
|
<label
|
||||||
class="col-form-label"
|
class="col-form-label"
|
||||||
for="birthdate_date"
|
for="birthdate_date"
|
||||||
> Birth Date</label>
|
> Birth Date</label>
|
||||||
<input
|
<input
|
||||||
type="date"
|
type="date"
|
||||||
t-att-name="'birthdate_date-'+ str(count)"
|
t-att-name="'birthdate_date-'+ str(count)"
|
||||||
t-attf-class="form-control"
|
t-attf-class="form-control #{error.get('birthdate_date-'+str(count)) and 'is-invalid' or ''}"
|
||||||
t-att-value="birthdate_date or checkin_partner.birthdate_date"
|
t-att-value="birthdate_date or checkin_partner.birthdate_date"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div t-attf-class="form-group col-xl-6">
|
<div
|
||||||
<label
|
t-attf-class="form-group col-xl-6"
|
||||||
|
>
|
||||||
|
<label
|
||||||
class="col-form-label"
|
class="col-form-label"
|
||||||
for="gender"
|
for="gender"
|
||||||
>Gender</label>
|
>Gender</label>
|
||||||
@@ -312,25 +321,28 @@
|
|||||||
t-att-name="'gender-'+ str(count)"
|
t-att-name="'gender-'+ str(count)"
|
||||||
t-att-value="gender or checkin_partner.gender"
|
t-att-value="gender or checkin_partner.gender"
|
||||||
>
|
>
|
||||||
<option
|
<option
|
||||||
value=""
|
value=""
|
||||||
>Select an option</option>
|
>Select an option</option>
|
||||||
<option
|
<option
|
||||||
value="female"
|
value="female"
|
||||||
>Female</option>
|
>Female</option>
|
||||||
<option
|
<option
|
||||||
value="male"
|
value="male"
|
||||||
>Male</option>
|
>Male</option>
|
||||||
<option
|
<option
|
||||||
value="other"
|
value="other"
|
||||||
>Other</option>
|
>Other</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div t-attf-class="form-group col-xl-6">
|
<div
|
||||||
<label
|
t-attf-class="form-group col-xl-6"
|
||||||
|
>
|
||||||
|
<label
|
||||||
class="col-form-label"
|
class="col-form-label"
|
||||||
for="document_type"
|
for="document_type"
|
||||||
>Doc. type</label>
|
>Doc. type</label>
|
||||||
|
|
||||||
<div class="d-none"><p
|
<div class="d-none"><p
|
||||||
class="doc_type_class"
|
class="doc_type_class"
|
||||||
t-att-id="'docTypeId'+str(count)"
|
t-att-id="'docTypeId'+str(count)"
|
||||||
@@ -338,53 +350,59 @@
|
|||||||
t-esc="checkin_partner.document_type"
|
t-esc="checkin_partner.document_type"
|
||||||
/></p></div>
|
/></p></div>
|
||||||
<select
|
<select
|
||||||
class="form-control select_doc_type_class"
|
t-attf-class="form-control select_doc_type_class #{error.get('document_type-'+ str(count)) and 'is-invalid' or ''}"
|
||||||
t-att-id="'doc_type_id'+str(count)"
|
t-att-id="'doc_type_id'+str(count)"
|
||||||
t-att-name="'document_type-'+ str(count)"
|
t-att-name="'document_type-'+ str(count)"
|
||||||
t-att-value="document_type or checkin_partner.document_type"
|
t-att-value="document_type or checkin_partner.document_type"
|
||||||
>
|
>
|
||||||
<option
|
<option
|
||||||
value=""
|
value=""
|
||||||
>Select an option</option>
|
>Select an option</option>
|
||||||
<option value="D">DNI</option>
|
<option
|
||||||
<option
|
value="D"
|
||||||
|
>DNI</option>
|
||||||
|
<option
|
||||||
value="P"
|
value="P"
|
||||||
>Passport</option>
|
>Passport</option>
|
||||||
<option
|
<option
|
||||||
value="C"
|
value="C"
|
||||||
>Driving License</option>
|
>Driving License</option>
|
||||||
<option
|
<option
|
||||||
value="I"
|
value="I"
|
||||||
>Identification Document</option>
|
>Identification Document</option>
|
||||||
<option
|
<option
|
||||||
value="N"
|
value="N"
|
||||||
>Spanish residence permit</option>
|
>Spanish residence permit</option>
|
||||||
<option
|
<option
|
||||||
value="X"
|
value="X"
|
||||||
>European residence permit</option>
|
>European residence permit</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div t-attf-class="form-group col-xl-6">
|
<div
|
||||||
<label
|
t-attf-class="form-group col-xl-6"
|
||||||
|
>
|
||||||
|
<label
|
||||||
class="col-form-label"
|
class="col-form-label"
|
||||||
for="document_number"
|
for="document_number"
|
||||||
>Doc. number</label>
|
>Doc. number</label>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
t-att-name="'document_number-'+ str(count)"
|
t-att-name="'document_number-'+ str(count)"
|
||||||
t-attf-class="form-control"
|
t-attf-class="form-control #{error.get('document_number-'+str(count)) and 'is-invalid' or ''}"
|
||||||
t-att-value="document_number or checkin_partner.document_number"
|
t-att-value="document_number or checkin_partner.document_number"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div t-attf-class="form-group col-xl-6">
|
<div
|
||||||
<label
|
t-attf-class="form-group col-xl-6"
|
||||||
|
>
|
||||||
|
<label
|
||||||
class="col-form-label"
|
class="col-form-label"
|
||||||
for="document_expedition_date"
|
for="document_expedition_date"
|
||||||
>Doc. expedition date</label>
|
>Doc. expedition date</label>
|
||||||
<input
|
<input
|
||||||
type="date"
|
type="date"
|
||||||
t-att-name="'document_expedition_date-'+ str(count)"
|
t-att-name="'document_expedition_date-'+ str(count)"
|
||||||
t-attf-class="form-control"
|
t-attf-class="form-control #{error.get('document_expedition_date-'+str(count)) and 'is-invalid' or ''}"
|
||||||
t-att-value="document_expedition_date or checkin_partner.document_expedition_date"
|
t-att-value="document_expedition_date or checkin_partner.document_expedition_date"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -393,38 +411,40 @@
|
|||||||
class="col-form-label"
|
class="col-form-label"
|
||||||
for="mobile"
|
for="mobile"
|
||||||
>Mobile</label>
|
>Mobile</label>
|
||||||
<input
|
<input
|
||||||
type="phone"
|
type="phone"
|
||||||
t-att-name="'mobile-'+ str(count)"
|
t-att-name="'mobile-'+ str(count)"
|
||||||
t-attf-class="form-control #{error.get('mobile-'+str(count)) and 'is-invalid' or ''}"
|
t-attf-class="form-control #{error.get('mobile-'+str(count)) and 'is-invalid' or ''}"
|
||||||
t-att-value="mobile or checkin_partner.mobile"
|
t-att-value="mobile or checkin_partner.mobile"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div t-attf-class="form-group col-xl-6">
|
<div
|
||||||
<label
|
t-attf-class="form-group col-xl-6"
|
||||||
|
>
|
||||||
|
<label
|
||||||
class="col-form-label"
|
class="col-form-label"
|
||||||
for="email"
|
for="email"
|
||||||
>Email</label>
|
>Email</label>
|
||||||
<input
|
<input
|
||||||
type="email"
|
type="email"
|
||||||
t-att-name="'email-'+ str(count)"
|
t-att-name="'email-'+ str(count)"
|
||||||
t-attf-class="form-control"
|
t-attf-class="form-control #{error.get('email-'+str(count)) and 'is-invalid' or ''}"
|
||||||
t-att-value="email or checkin_partner.email"
|
t-att-value="email or checkin_partner.email"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
t-attf-class="form-group col-xl-6 d-none"
|
t-attf-class="form-group col-xl-6 d-none"
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
t-att-name="'id-'+ str(count)"
|
t-att-name="'id-'+ str(count)"
|
||||||
t-attf-class="form-control"
|
t-attf-class="form-control"
|
||||||
t-att-value="id or checkin_partner.id"
|
t-att-value="id or checkin_partner.id"
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</t>
|
</t>
|
||||||
@@ -499,11 +519,7 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<t t-set="count" t-value="0" />
|
<t t-set="count" t-value="0" />
|
||||||
<form
|
<form action="/my/precheckin/folio_reservation" method="post">
|
||||||
class="collapse"
|
|
||||||
action="/my/precheckin/folio_reservation"
|
|
||||||
method="post"
|
|
||||||
>
|
|
||||||
<div
|
<div
|
||||||
t-if="error_message"
|
t-if="error_message"
|
||||||
class="alert alert-danger"
|
class="alert alert-danger"
|
||||||
@@ -576,7 +592,7 @@
|
|||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
t-att-name="'firstname-' + str(count)"
|
t-att-name="'firstname-' + str(count)"
|
||||||
t-attf-class="form-control"
|
t-attf-class="form-control #{error.get('firstname-'+str(count)) and 'is-invalid' or ''}"
|
||||||
t-att-value="firstname or (checkin_partner.firstname)"
|
t-att-value="firstname or (checkin_partner.firstname)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -618,7 +634,7 @@
|
|||||||
<input
|
<input
|
||||||
type="date"
|
type="date"
|
||||||
t-att-name="'birthdate_date-'+ str(count)"
|
t-att-name="'birthdate_date-'+ str(count)"
|
||||||
t-attf-class="form-control"
|
t-attf-class="form-control #{error.get('birthdate_date-'+str(count)) and 'is-invalid' or ''}"
|
||||||
t-att-value="birthdate_date or checkin_partner.birthdate_date"
|
t-att-value="birthdate_date or checkin_partner.birthdate_date"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -669,7 +685,7 @@
|
|||||||
t-esc="checkin_partner.document_type"
|
t-esc="checkin_partner.document_type"
|
||||||
/></p></div>
|
/></p></div>
|
||||||
<select
|
<select
|
||||||
class="form-control select_doc_type_class"
|
t-attf-class="form-control select_doc_type_class #{error.get('document_type-'+ str(count)) and 'is-invalid' or ''}"
|
||||||
t-att-id="'doc_type_id'+str(count)"
|
t-att-id="'doc_type_id'+str(count)"
|
||||||
t-att-name="'document_type-'+ str(count)"
|
t-att-name="'document_type-'+ str(count)"
|
||||||
t-att-value="document_type or checkin_partner.document_type"
|
t-att-value="document_type or checkin_partner.document_type"
|
||||||
@@ -707,7 +723,7 @@
|
|||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
t-att-name="'document_number-'+ str(count)"
|
t-att-name="'document_number-'+ str(count)"
|
||||||
t-attf-class="form-control"
|
t-attf-class="form-control #{error.get('document_number-'+str(count)) and 'is-invalid' or ''}"
|
||||||
t-att-value="document_number or checkin_partner.document_number"
|
t-att-value="document_number or checkin_partner.document_number"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -721,7 +737,7 @@
|
|||||||
<input
|
<input
|
||||||
type="date"
|
type="date"
|
||||||
t-att-name="'document_expedition_date-'+ str(count)"
|
t-att-name="'document_expedition_date-'+ str(count)"
|
||||||
t-attf-class="form-control"
|
t-attf-class="form-control #{error.get('document_expedition_date-'+str(count)) and 'is-invalid' or ''}"
|
||||||
t-att-value="document_expedition_date or checkin_partner.document_expedition_date"
|
t-att-value="document_expedition_date or checkin_partner.document_expedition_date"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -749,7 +765,7 @@
|
|||||||
<input
|
<input
|
||||||
type="email"
|
type="email"
|
||||||
t-att-name="'email-'+ str(count)"
|
t-att-name="'email-'+ str(count)"
|
||||||
t-attf-class="form-control"
|
t-attf-class="form-control #{error.get('email-'+str(count)) and 'is-invalid' or ''}"
|
||||||
t-att-value="email or checkin_partner.email"
|
t-att-value="email or checkin_partner.email"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user