mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP] added traveller report of checkin partners
This commit is contained in:
@@ -33,8 +33,10 @@
|
||||
"data/cron_jobs.xml",
|
||||
"data/pms_sequence.xml",
|
||||
"data/pms_data.xml",
|
||||
"data/traveller_report_paperformat.xml",
|
||||
"report/pms_folio.xml",
|
||||
"report/pms_folio_templates.xml",
|
||||
"report/traveller_report_action.xml",
|
||||
# "templates/pms_email_template.xml",
|
||||
"data/menus.xml",
|
||||
"wizards/wizard_payment_folio.xml",
|
||||
@@ -73,6 +75,8 @@
|
||||
"views/account_journal_views.xml",
|
||||
"views/folio_portal_templates.xml",
|
||||
"views/reservation_portal_templates.xml",
|
||||
"views/res_company_views.xml",
|
||||
"views/traveller_report_template.xml",
|
||||
"wizards/wizard_split_join_swap_reservation.xml",
|
||||
"wizards/wizard_massive_changes.xml",
|
||||
"wizards/wizard_advanced_filters.xml",
|
||||
|
||||
20
pms/data/traveller_report_paperformat.xml
Normal file
20
pms/data/traveller_report_paperformat.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="report_viajero_paperformat" model="report.paperformat">
|
||||
<field name="name">Traveller Report PaperFormat</field>
|
||||
<field name="default" eval="True" />
|
||||
<field name="format">custom</field>
|
||||
<field name="page_height">200</field>
|
||||
<field name="page_width">75</field>
|
||||
<field name="orientation">Portrait</field>
|
||||
<field name="margin_top">1</field>
|
||||
<field name="margin_bottom">3</field>
|
||||
<field name="margin_left">0</field>
|
||||
<field name="margin_right">0</field>
|
||||
<field name="header_line" eval="False" />
|
||||
<field name="header_spacing">1</field>
|
||||
<field name="dpi">201</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -89,6 +89,15 @@ class PmsProperty(models.Model):
|
||||
selection=_tz_get,
|
||||
)
|
||||
|
||||
cardex_warning = fields.Text(
|
||||
string="Warning in Cardex",
|
||||
default="Time to access rooms: 14: 00h. "
|
||||
"Departure time: 12: 00h. If the accommodation "
|
||||
"is not left at that time, the establishment will "
|
||||
"charge a day's stay according to current rate that day",
|
||||
help="Notice under the signature on the traveler's ticket.",
|
||||
)
|
||||
|
||||
@api.constrains("default_arrival_hour")
|
||||
def _check_arrival_hour(self):
|
||||
for record in self:
|
||||
|
||||
@@ -13,3 +13,8 @@ class ResCompany(models.Model):
|
||||
comodel_name="pms.property",
|
||||
inverse_name="company_id",
|
||||
)
|
||||
|
||||
privacy_policy = fields.Text(
|
||||
string="Privacy Policy",
|
||||
help="Authorization by the user for the" "manage of their personal data",
|
||||
)
|
||||
|
||||
14
pms/report/traveller_report_action.xml
Normal file
14
pms/report/traveller_report_action.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<data>
|
||||
<report
|
||||
id="action_report_viajero"
|
||||
string="Parte de Viajero"
|
||||
model="pms.checkin.partner"
|
||||
report_type="qweb-pdf"
|
||||
name="pms.report_viajero"
|
||||
file="pms.report_viajero"
|
||||
paperformat="report_viajero_paperformat"
|
||||
/>
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -59,6 +59,16 @@
|
||||
<field name="reservation_id" />
|
||||
<field name="folio_id" />
|
||||
<field name="identifier" />
|
||||
<button
|
||||
type="action"
|
||||
class="oe_stat_button"
|
||||
icon="fa-file-pdf-o"
|
||||
name="%(action_report_viajero)d"
|
||||
context="{'partner_id': partner_id,'enter_date': arrival,
|
||||
'exit_date': departure,'reservation_ids': reservation_id,
|
||||
'hidden_cardex': True, 'edit_cardex': True }"
|
||||
string="Print in PDF"
|
||||
/>
|
||||
<field name="pms_property_id" invisible="1" />
|
||||
</group>
|
||||
</group>
|
||||
|
||||
@@ -37,6 +37,9 @@
|
||||
<field name="default_arrival_hour" />
|
||||
<field name="default_departure_hour" />
|
||||
</group>
|
||||
<group string="Print in cardex">
|
||||
<field name="cardex_warning" />
|
||||
</group>
|
||||
</page>
|
||||
<page string="Rooms" name="property_rooms">
|
||||
<group>
|
||||
|
||||
16
pms/views/res_company_views.xml
Normal file
16
pms/views/res_company_views.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="company_view_form" model="ir.ui.view">
|
||||
<field name="model">res.company</field>
|
||||
<field name="inherit_id" ref="base.view_company_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page[@name='general_info']" position="after">
|
||||
<page string="Cardex Settings" name="cardex_settings">
|
||||
<group name="privacy_policy" string="Privacy Policy">
|
||||
<field name="privacy_policy" />
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
154
pms/views/traveller_report_template.xml
Normal file
154
pms/views/traveller_report_template.xml
Normal file
@@ -0,0 +1,154 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<template id="report_viajero">
|
||||
<t t-call="web.basic_layout">
|
||||
<img
|
||||
t-attf-src="data:image/*;base64,{{docs.pms_property_id.company_id.logo}}"
|
||||
t-att-alt="docs.pms_property_id.company_id.name"
|
||||
/>
|
||||
<p>PART OF TRAVELERS ENTRY</p>
|
||||
<p>Document number:
|
||||
<strong><span t-field="docs.id" /></strong>/
|
||||
<span t-field="docs.reservation_id" />
|
||||
</p>
|
||||
<p>
|
||||
Total amount (Reservation Card):
|
||||
<strong><span
|
||||
t-field="docs.reservation_id.folio_id.amount_total"
|
||||
/></strong>
|
||||
</p>
|
||||
<div>
|
||||
<strong><span t-field="docs.pms_property_id.name" /></strong><br />
|
||||
<strong>CIF:
|
||||
<span t-field="docs.pms_property_id.company_id.vat" /></strong><br
|
||||
/>
|
||||
<span t-field="docs.pms_property_id.company_id.name" /><br />
|
||||
<strong><span t-field="docs.pms_property_id.company_id.street" />
|
||||
<span
|
||||
t-field="docs.pms_property_id.company_id.street2"
|
||||
/></strong><br />
|
||||
<strong><span t-field="docs.pms_property_id.company_id.zip" />
|
||||
<span t-field="docs.pms_property_id.company_id.city" /></strong><br
|
||||
/></div>
|
||||
<p>TRAVELER'S DOCUMENT</p>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
Document number</td>
|
||||
<td>
|
||||
<strong>
|
||||
<span t-field="docs.document_number" /></strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Type
|
||||
</td>
|
||||
<td>
|
||||
<strong>
|
||||
<span t-field="docs.document_type" />
|
||||
</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Expedition date</td>
|
||||
<td>
|
||||
<strong>
|
||||
<span t-field="docs.document_expedition_date" /></strong>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
Name</td>
|
||||
<td>
|
||||
<strong>
|
||||
<span t-field="docs.firstname" /></strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Lastnames</td>
|
||||
<td>
|
||||
<strong>
|
||||
<span t-field="docs.lastname" />
|
||||
<span t-field="docs.lastname2" />
|
||||
</strong>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
Gender</td>
|
||||
<td>
|
||||
<strong>
|
||||
<span t-field="docs.gender" /></strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Birthdate</td>
|
||||
<td>
|
||||
<strong>
|
||||
<span t-field="docs.birthdate_date" /></strong>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
Entry date</td>
|
||||
<td>
|
||||
<strong>
|
||||
<span t-field="docs.arrival" /></strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Exit date</td>
|
||||
<td>
|
||||
<strong><span t-field="docs.departure" /></strong>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div>
|
||||
<p>
|
||||
<span t-field="docs.pms_property_id.partner_id.city" />, at
|
||||
<span
|
||||
t-esc="time.strftime('%Y-%m-%d')"
|
||||
t-options="{"widget": "date"}"
|
||||
/>
|
||||
</p>
|
||||
<div
|
||||
class="firma"
|
||||
style="width: 85%; border:dotted 1px; height: 80px; margin:0 auto;"
|
||||
/><br />
|
||||
<p>Traveler's signature</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>
|
||||
</div>
|
||||
<style>
|
||||
table{
|
||||
width: 100%;
|
||||
border: 1;
|
||||
border-style: double;
|
||||
}
|
||||
td:first-child{
|
||||
width:40%;
|
||||
padding-left:3px;
|
||||
border:double;
|
||||
border-width:1px;
|
||||
}
|
||||
td:last-child{
|
||||
width:100%;
|
||||
padding-left:3px;
|
||||
border:double;
|
||||
border-width:1px;
|
||||
}
|
||||
</style>
|
||||
</t>
|
||||
</template>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user