mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP]pms: signature and signature on fields in checkin partner
This commit is contained in:
@@ -286,6 +286,17 @@ class PmsCheckinPartner(models.Model):
|
||||
string="Partner relationship", help="Family relationship between travelers"
|
||||
)
|
||||
|
||||
signature = fields.Image(
|
||||
string="Signature",
|
||||
help="Signature of the guest",
|
||||
)
|
||||
|
||||
sign_on = fields.Datetime(
|
||||
string="Sign on",
|
||||
help="Date and time of the signature",
|
||||
compute="_compute_sign_on",
|
||||
)
|
||||
|
||||
@api.depends("partner_id")
|
||||
def _compute_document_number(self):
|
||||
for record in self:
|
||||
@@ -605,6 +616,14 @@ class PmsCheckinPartner(models.Model):
|
||||
else:
|
||||
record.partner_incongruences = False
|
||||
|
||||
@api.depends("signature")
|
||||
def _compute_sign_on(self):
|
||||
for record in self:
|
||||
if record.signature:
|
||||
record.sign_on = datetime.now()
|
||||
else:
|
||||
record.sign_on = False
|
||||
|
||||
def _compute_access_url(self):
|
||||
super(PmsCheckinPartner, self)._compute_access_url()
|
||||
for checkin in self:
|
||||
|
||||
@@ -116,6 +116,8 @@
|
||||
<field name="folio_id" />
|
||||
<field name="identifier" />
|
||||
<field name="partner_relationship" />
|
||||
<field name="signature" />
|
||||
<field name="sign_on" />
|
||||
<field name="pms_property_id" invisible="1" />
|
||||
</group>
|
||||
</group>
|
||||
|
||||
@@ -149,9 +149,17 @@
|
||||
t-options="{"widget": "date"}"
|
||||
/>
|
||||
</p>
|
||||
<div class="firma" />
|
||||
<div class="sign">
|
||||
<div class="signature-wrapper" t-if="docs.signature">
|
||||
<img
|
||||
class="checkin-signature"
|
||||
t-attf-src="data:image/*;base64,{{docs.signature}}"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<p class="signature">Traveler's signature</p>
|
||||
|
||||
<p>
|
||||
<span t-field="docs.pms_property_id.cardex_warning" />
|
||||
</p>
|
||||
@@ -337,11 +345,25 @@
|
||||
border:double;
|
||||
border-width:1px;
|
||||
}
|
||||
.firma{
|
||||
width: 85%;
|
||||
.sign{
|
||||
width: 100%;
|
||||
border:dotted 1px;
|
||||
height: 80px;
|
||||
margin:0 auto;
|
||||
height: 100px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.signature-wrapper {
|
||||
width: 200px;
|
||||
height: 100px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.checkin-signature {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
p,.property{
|
||||
text-align: center;
|
||||
|
||||
Reference in New Issue
Block a user