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"
|
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")
|
@api.depends("partner_id")
|
||||||
def _compute_document_number(self):
|
def _compute_document_number(self):
|
||||||
for record in self:
|
for record in self:
|
||||||
@@ -605,6 +616,14 @@ class PmsCheckinPartner(models.Model):
|
|||||||
else:
|
else:
|
||||||
record.partner_incongruences = False
|
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):
|
def _compute_access_url(self):
|
||||||
super(PmsCheckinPartner, self)._compute_access_url()
|
super(PmsCheckinPartner, self)._compute_access_url()
|
||||||
for checkin in self:
|
for checkin in self:
|
||||||
|
|||||||
@@ -116,6 +116,8 @@
|
|||||||
<field name="folio_id" />
|
<field name="folio_id" />
|
||||||
<field name="identifier" />
|
<field name="identifier" />
|
||||||
<field name="partner_relationship" />
|
<field name="partner_relationship" />
|
||||||
|
<field name="signature" />
|
||||||
|
<field name="sign_on" />
|
||||||
<field name="pms_property_id" invisible="1" />
|
<field name="pms_property_id" invisible="1" />
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
|
|||||||
@@ -149,9 +149,17 @@
|
|||||||
t-options="{"widget": "date"}"
|
t-options="{"widget": "date"}"
|
||||||
/>
|
/>
|
||||||
</p>
|
</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 />
|
<br />
|
||||||
<p class="signature">Traveler's signature</p>
|
<p class="signature">Traveler's signature</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<span t-field="docs.pms_property_id.cardex_warning" />
|
<span t-field="docs.pms_property_id.cardex_warning" />
|
||||||
</p>
|
</p>
|
||||||
@@ -337,11 +345,25 @@
|
|||||||
border:double;
|
border:double;
|
||||||
border-width:1px;
|
border-width:1px;
|
||||||
}
|
}
|
||||||
.firma{
|
.sign{
|
||||||
width: 85%;
|
width: 100%;
|
||||||
border:dotted 1px;
|
border:dotted 1px;
|
||||||
height: 80px;
|
height: 100px;
|
||||||
margin:0 auto;
|
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{
|
p,.property{
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|||||||
Reference in New Issue
Block a user