mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
@@ -606,7 +606,7 @@ class PmsCheckinPartner(models.Model):
|
|||||||
def open_partner(self):
|
def open_partner(self):
|
||||||
""" Utility method used to add an "View Customer" button in folio views """
|
""" Utility method used to add an "View Customer" button in folio views """
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
partner_form_id = self.env.ref("base.view_partner_address_form").id
|
partner_form_id = self.env.ref("pms.view_partner_data_form").id
|
||||||
return {
|
return {
|
||||||
"type": "ir.actions.act_window",
|
"type": "ir.actions.act_window",
|
||||||
"res_model": "res.partner",
|
"res_model": "res.partner",
|
||||||
|
|||||||
@@ -1474,7 +1474,7 @@ class PmsReservation(models.Model):
|
|||||||
checkins = self.env["pms.checkin.partner"]
|
checkins = self.env["pms.checkin.partner"]
|
||||||
for record in self:
|
for record in self:
|
||||||
checkins += record.checkin_partner_ids.filtered(
|
checkins += record.checkin_partner_ids.filtered(
|
||||||
lambda s: s.state in ("onboard", "done")
|
lambda s: s.state in ("precheckin", "onboard", "done")
|
||||||
)
|
)
|
||||||
if checkins:
|
if checkins:
|
||||||
return self.env.ref("pms.action_traveller_report").report_action(checkins)
|
return self.env.ref("pms.action_traveller_report").report_action(checkins)
|
||||||
|
|||||||
@@ -824,7 +824,7 @@ class TestPmsCheckinPartner(TestPms):
|
|||||||
# ASSERT
|
# ASSERT
|
||||||
self.assertTrue(self.host1.mobile, "Partner mobile must be added")
|
self.assertTrue(self.host1.mobile, "Partner mobile must be added")
|
||||||
|
|
||||||
def _test_partner_id_numbers_created_from_checkin(self):
|
def test_partner_id_numbers_created_from_checkin(self):
|
||||||
"""
|
"""
|
||||||
Some of the required data of the checkin_partner to create the partner are document_type
|
Some of the required data of the checkin_partner to create the partner are document_type
|
||||||
and document_number, with them an id_number is created associated with the partner that
|
and document_number, with them an id_number is created associated with the partner that
|
||||||
@@ -842,6 +842,8 @@ class TestPmsCheckinPartner(TestPms):
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
checkin.flush()
|
||||||
|
|
||||||
# ASSERT
|
# ASSERT
|
||||||
self.assertTrue(
|
self.assertTrue(
|
||||||
checkin.partner_id.id_numbers,
|
checkin.partner_id.id_numbers,
|
||||||
@@ -864,12 +866,13 @@ class TestPmsCheckinPartner(TestPms):
|
|||||||
"Checkin partner email and partner email shouldn't match",
|
"Checkin partner email and partner email shouldn't match",
|
||||||
)
|
)
|
||||||
|
|
||||||
def _test_partner_modified_previous_checkin_not_modified(self):
|
def test_partner_modified_previous_checkin_not_modified(self):
|
||||||
"""
|
"""
|
||||||
If a partner modifies any of its fields, these change mustn't be reflected
|
If a partner modifies any of its fields, these change mustn't be reflected
|
||||||
in the previous checkins associated with it
|
in the previous checkins associated with it
|
||||||
"""
|
"""
|
||||||
# ARRANGE
|
# ARRANGE
|
||||||
|
self.checkin1.flush()
|
||||||
self.host1.gender = "female"
|
self.host1.gender = "female"
|
||||||
# ASSERT
|
# ASSERT
|
||||||
self.assertNotEqual(
|
self.assertNotEqual(
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
icon="fa-file-pdf-o"
|
icon="fa-file-pdf-o"
|
||||||
name="%(action_traveller_report)d"
|
name="%(action_traveller_report)d"
|
||||||
string="Print in PDF"
|
string="Print in PDF"
|
||||||
attrs="{'invisible': [('state','not in', ('onboard','done'))]}"
|
attrs="{'invisible': [('state','not in', ('precheckin','onboard','done'))]}"
|
||||||
/>
|
/>
|
||||||
</sheet>
|
</sheet>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -93,6 +93,44 @@
|
|||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
<record id="view_partner_data_form" model="ir.ui.view">
|
||||||
|
<field name="name">res.partner.form.data</field>
|
||||||
|
<field name="model">res.partner</field>
|
||||||
|
<field name="priority" eval="20" />
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form string="Partner">
|
||||||
|
<field
|
||||||
|
name="image_1920"
|
||||||
|
widget='image'
|
||||||
|
class="oe_avatar"
|
||||||
|
options='{"preview_image": "image_128"}'
|
||||||
|
readonly="1"
|
||||||
|
/>
|
||||||
|
<div class="oe_title">
|
||||||
|
<h1>
|
||||||
|
<field name="name" readonly="1" />
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
<group>
|
||||||
|
<group name="group_top">
|
||||||
|
<group name="group_left">
|
||||||
|
|
||||||
|
<field name="firstname" />
|
||||||
|
<field name="lastname" />
|
||||||
|
<field name="lastname2" />
|
||||||
|
<field name="gender" />
|
||||||
|
<field name="birthdate_date" />
|
||||||
|
<field name="id_numbers" />
|
||||||
|
<field name="nationality_id" />
|
||||||
|
<field name="email" />
|
||||||
|
<field name="mobile" />
|
||||||
|
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
<menuitem
|
<menuitem
|
||||||
id="pms_customer_meu"
|
id="pms_customer_meu"
|
||||||
name="Customers"
|
name="Customers"
|
||||||
|
|||||||
@@ -7,18 +7,18 @@
|
|||||||
t-attf-src="data:image/*;base64,{{docs.pms_property_id.company_id.logo}}"
|
t-attf-src="data:image/*;base64,{{docs.pms_property_id.company_id.logo}}"
|
||||||
t-att-alt="docs.pms_property_id.company_id.name"
|
t-att-alt="docs.pms_property_id.company_id.name"
|
||||||
/>
|
/>
|
||||||
<p>PART OF TRAVELERS ENTRY</p>
|
<p class="title">PART OF TRAVELERS ENTRY</p>
|
||||||
<p>Document number:
|
<p class="checknumber">Document number:
|
||||||
<strong><span t-field="docs.id" /></strong>/
|
<strong><span t-field="docs.id" /></strong>/
|
||||||
<span t-field="docs.reservation_id" />
|
<span t-field="docs.reservation_id" />
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p class="amount">
|
||||||
Total amount (Reservation Card):
|
Total amount (Reservation Card):
|
||||||
<strong><span
|
<strong><span
|
||||||
t-field="docs.reservation_id.folio_id.amount_total"
|
t-field="docs.reservation_id.folio_id.amount_total"
|
||||||
/></strong>
|
/></strong>
|
||||||
</p>
|
</p>
|
||||||
<div class="property">
|
<div class="property amount">
|
||||||
<strong><span t-field="docs.pms_property_id.name" /></strong><br />
|
<strong><span t-field="docs.pms_property_id.name" /></strong><br />
|
||||||
<strong>CIF:
|
<strong>CIF:
|
||||||
<span t-field="docs.pms_property_id.company_id.vat" /></strong><br
|
<span t-field="docs.pms_property_id.company_id.vat" /></strong><br
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
<span t-field="docs.pms_property_id.company_id.city" /></strong><b
|
<span t-field="docs.pms_property_id.company_id.city" /></strong><b
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<p>TRAVELER'S DOCUMENT</p>
|
<p class="title2">TRAVELER'S DOCUMENT</p>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -106,7 +106,7 @@
|
|||||||
/>
|
/>
|
||||||
</p>
|
</p>
|
||||||
<div class="firma" /><br />
|
<div class="firma" /><br />
|
||||||
<p>Traveler's signature</p>
|
<p class="signature">Traveler's signature</p>
|
||||||
<p><span t-field="docs.pms_property_id.cardex_warning" /></p>
|
<p><span t-field="docs.pms_property_id.cardex_warning" /></p>
|
||||||
<p><span t-field="docs.pms_property_id.company_id.privacy_policy" /></p>
|
<p><span t-field="docs.pms_property_id.company_id.privacy_policy" /></p>
|
||||||
</div>
|
</div>
|
||||||
@@ -115,18 +115,18 @@
|
|||||||
t-attf-src="data:image/*;base64,{{docs.pms_property_id.company_id.logo}}"
|
t-attf-src="data:image/*;base64,{{docs.pms_property_id.company_id.logo}}"
|
||||||
t-att-alt="docs.pms_property_id.company_id.name"
|
t-att-alt="docs.pms_property_id.company_id.name"
|
||||||
/>
|
/>
|
||||||
<p>PART OF TRAVELERS ENTRY</p>
|
<p class="title">PART OF TRAVELERS ENTRY</p>
|
||||||
<p>Document number:
|
<p class="checknumber">Document number:
|
||||||
<strong><span t-field="docs.id" /></strong>/
|
<strong><span t-field="docs.id" /></strong>/
|
||||||
<span t-field="docs.reservation_id" />
|
<span t-field="docs.reservation_id" />
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p class="amount">
|
||||||
Total amount (Reservation Card):
|
Total amount (Reservation Card):
|
||||||
<strong><span
|
<strong><span
|
||||||
t-field="docs.reservation_id.folio_id.amount_total"
|
t-field="docs.reservation_id.folio_id.amount_total"
|
||||||
/></strong>
|
/></strong>
|
||||||
</p>
|
</p>
|
||||||
<div class="property">
|
<div class="property amount">
|
||||||
<strong><span t-field="docs.pms_property_id.name" /></strong><br />
|
<strong><span t-field="docs.pms_property_id.name" /></strong><br />
|
||||||
<strong>CIF:
|
<strong>CIF:
|
||||||
<span t-field="docs.pms_property_id.company_id.vat" /></strong><br
|
<span t-field="docs.pms_property_id.company_id.vat" /></strong><br
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
<span t-field="docs.pms_property_id.company_id.city" /></strong><b
|
<span t-field="docs.pms_property_id.company_id.city" /></strong><b
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<p>TRAVELER'S DOCUMENT</p>
|
<p class="title2">TRAVELER'S DOCUMENT</p>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -224,7 +224,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
border: 1;
|
border: 1;
|
||||||
border-style: double;
|
border-style: double;
|
||||||
margin-top:8px;
|
margin-top:12px;
|
||||||
}
|
}
|
||||||
td:first-child{
|
td:first-child{
|
||||||
width:40%;
|
width:40%;
|
||||||
@@ -251,7 +251,27 @@
|
|||||||
.date{
|
.date{
|
||||||
margin-top:8px;
|
margin-top:8px;
|
||||||
}
|
}
|
||||||
|
.title{
|
||||||
|
font-size:1.9em;
|
||||||
|
}
|
||||||
|
.title2{
|
||||||
|
font-size:1.32em;
|
||||||
|
}
|
||||||
|
.amount{
|
||||||
|
font-size:1.8em;
|
||||||
|
}
|
||||||
|
.checknumber{
|
||||||
|
font-size:1.81em;
|
||||||
|
}
|
||||||
|
td{
|
||||||
|
font-size:180%;
|
||||||
|
}
|
||||||
|
p, span{
|
||||||
|
font-size:1.2em;
|
||||||
|
}
|
||||||
|
.signature, .date{
|
||||||
|
font-size: 1.2em;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</t>
|
</t>
|
||||||
</t>
|
</t>
|
||||||
|
|||||||
Reference in New Issue
Block a user