Fix reports
This commit is contained in:
parent
2227a12086
commit
a841b5f610
35
folio.py
35
folio.py
|
@ -2,7 +2,7 @@
|
|||
# this repository contains the full copyright notices and license terms.
|
||||
|
||||
from decimal import Decimal
|
||||
from datetime import timedelta, datetime
|
||||
from datetime import timedelta, datetime, date
|
||||
from trytond.model import ModelView, Workflow, ModelSQL, fields
|
||||
from trytond.pyson import Eval, Bool
|
||||
from trytond.pool import Pool
|
||||
|
@ -102,7 +102,7 @@ class Folio(ModelSQL, ModelView):
|
|||
target_country = fields.Many2One('party.nationality', 'Target Country',
|
||||
select=True, states=STATES_CHECKIN)
|
||||
registration_state = fields.Selection(REGISTRATION_STATE,
|
||||
'Registration State', readonly=True)
|
||||
'Registration State', readonly=True, select=True)
|
||||
charges = fields.One2Many('hotel.folio.charge', 'folio', 'Charges',
|
||||
states={
|
||||
'readonly': ~Eval('registration_state').in_(['check_in']),
|
||||
|
@ -1855,11 +1855,26 @@ class GuestsListReport(Report):
|
|||
user_id = Transaction().user
|
||||
|
||||
user = User(user_id)
|
||||
start_date = data['date']
|
||||
folios = Folio.search([
|
||||
('arrival_date', '<=', start_date),
|
||||
('registration_state', '=', 'check_in'),
|
||||
], order=[('room.code', 'ASC')])
|
||||
# start_date = data['date']
|
||||
if data['date'] == date.today():
|
||||
dom = ['OR', [
|
||||
('arrival_date', '=', data['date']),
|
||||
('registration_state', '=', 'check_in'),
|
||||
], [
|
||||
('departure_date', '=', data['date']),
|
||||
('registration_state', '=', 'check_in'),
|
||||
], [
|
||||
('arrival_date', '<=', data['date']),
|
||||
('departure_date', '>=', data['date']),
|
||||
('registration_state', '=', 'check_in'),
|
||||
]
|
||||
]
|
||||
else:
|
||||
dom = [
|
||||
('arrival_date', '<=', data['date']),
|
||||
('departure_date', '>=', data['date']),
|
||||
]
|
||||
folios = Folio.search(dom, order=[('room.code', 'ASC')])
|
||||
|
||||
total_guests = []
|
||||
rooms_occupied = []
|
||||
|
@ -1906,4 +1921,10 @@ class RegistrationCardReport(Report):
|
|||
report_context = super().get_context(records, header, data)
|
||||
user = Pool().get('res.user')(Transaction().user)
|
||||
report_context['company'] = user.company
|
||||
_records = []
|
||||
for rec in records:
|
||||
if not rec.registration_card:
|
||||
continue
|
||||
_records.append(rec)
|
||||
report_context['records'] = _records
|
||||
return report_context
|
||||
|
|
284
folio.xml
284
folio.xml
|
@ -38,11 +38,8 @@ this repository contains the full copyright notices and license terms. -->
|
|||
<field name="name">board_folio_form</field>
|
||||
</record>
|
||||
<record model="ir.action.act_window" id="act_board_folio_view">
|
||||
<field name="name">Board Folios</field>
|
||||
<field name="name">Board Frontdesk</field>
|
||||
<field name="res_model">hotel.folio</field>
|
||||
<field name="search_value"
|
||||
eval="[('create_date', '>=', DateTime(hour=0, minute=0, second=0, microsecond=0, delta_years=-1))]"
|
||||
pyson="1"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_hotel_board_folio_tree_view">
|
||||
<field name="sequence" eval="1"/>
|
||||
|
@ -57,26 +54,38 @@ this repository contains the full copyright notices and license terms. -->
|
|||
<menuitem parent="menu_booking_form" sequence="30"
|
||||
action="act_board_folio_view" id="menu_hotel_board_folio"/>
|
||||
|
||||
<record model="ir.action.act_window.domain" id="act_guest_moves_form_domain_arriving_today">
|
||||
<!-- <record model="ir.action.act_window.domain" id="act_guest_moves_form_domain_arriving_today">
|
||||
<field name="name">Arriving Today</field>
|
||||
<field name="sequence" eval="50"/>
|
||||
<field name="domain" eval="[('arrival_date', '=', Date())]" pyson="1"/>
|
||||
<field name="domain" eval="[
|
||||
('arrival_date', '=', Date()),
|
||||
('registration_state', 'in', ['pending', None]),
|
||||
]" pyson="1"/>
|
||||
<field name="act_window" ref="act_board_folio_view"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.domain" id="act_guest_moves_form_domain_leaving_today">
|
||||
<field name="name">Leaving Today</field>
|
||||
<field name="sequence" eval="70"/>
|
||||
<field name="domain" eval="[
|
||||
('departure_date', '=', Date()),
|
||||
('departure_date', '=', Date()),
|
||||
('registration_state', '=', 'check_in'),
|
||||
]" pyson="1"/>
|
||||
<field name="act_window" ref="act_board_folio_view"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.domain" id="act_guest_moves_form_domain_no_show_today">
|
||||
<field name="name">No Show Yesterday</field>
|
||||
<field name="name">No Show Today</field>
|
||||
<field name="sequence" eval="90"/>
|
||||
<field name="domain" eval="[
|
||||
('arrival_date', '=', Date()),
|
||||
('booking.registration_state', 'in', ['no_show']),
|
||||
('registration_state', 'in', ['no_show']),
|
||||
]" pyson="1"/>
|
||||
<field name="act_window" ref="act_board_folio_view"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.domain" id="act_guest_moves_form_domain_present">
|
||||
<field name="name">Present</field>
|
||||
<field name="sequence" eval="90"/>
|
||||
<field name="domain" eval="[
|
||||
('registration_state', 'in', ['check_in']),
|
||||
]" pyson="1"/>
|
||||
<field name="act_window" ref="act_board_folio_view"/>
|
||||
</record>
|
||||
|
@ -87,7 +96,7 @@ this repository contains the full copyright notices and license terms. -->
|
|||
('arrival_date', '>=', Date()),
|
||||
]" pyson="1"/>
|
||||
<field name="act_window" ref="act_board_folio_view"/>
|
||||
</record>
|
||||
</record> -->
|
||||
|
||||
<record model="ir.action.report" id="report_registration_card">
|
||||
<field name="name">Registration Card</field>
|
||||
|
@ -102,93 +111,24 @@ this repository contains the full copyright notices and license terms. -->
|
|||
<field name="action" ref="report_registration_card"/>
|
||||
</record>
|
||||
|
||||
<!-- <record model="ir.ui.view" id="operation_view_tree">
|
||||
<field name="model">hotel.operation</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="name">operation_tree</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="operation_view_form">
|
||||
<field name="model">hotel.operation</field>
|
||||
<record model="ir.ui.view" id="open_migration_start_view_form">
|
||||
<field name="model">hotel.open_migration.start</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">operation_form</field>
|
||||
<field name="name">open_migration_form</field>
|
||||
</record>
|
||||
<record model="ir.action.act_window" id="act_operation_tree">
|
||||
<field name="name">Operation Forecast</field>
|
||||
<field name="res_model">hotel.operation</field>
|
||||
<record model="ir.action.wizard" id="act_open_migration">
|
||||
<field name="name">Open Migration Report</field>
|
||||
<field name="wiz_name">hotel.open_migration</field>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_operation_view_tree1">
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="view" ref="operation_view_tree"/>
|
||||
<field name="act_window" ref="act_operation_tree"/>
|
||||
<record model="ir.action.report" id="report_migration">
|
||||
<field name="name">Migration Report</field>
|
||||
<field name="model"></field>
|
||||
<field name="report_name">hotel.migration</field>
|
||||
<field name="report">hotel/migration_report.fods</field>
|
||||
<field name="template_extension">ods</field>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_operation_view_tree2">
|
||||
<field name="sequence" eval="20"/>
|
||||
<field name="view" ref="operation_view_form"/>
|
||||
<field name="act_window" ref="act_operation_tree"/>
|
||||
</record>
|
||||
<menuitem name="Operations" parent="hotel.menu_hotel" sequence="14"
|
||||
id="menu_hotel_operation" action="act_operation_tree"/> -->
|
||||
|
||||
<!-- <record model="ir.model.button" id="operation_cancel_button">
|
||||
<field name="name">cancel</field>
|
||||
<field name="model" search="[('model', '=', 'hotel.operation')]"/>
|
||||
</record>
|
||||
<record model="ir.model.button-res.group" id="operation_cancel_button_group_hotel">
|
||||
<field name="button" ref="operation_cancel_button"/>
|
||||
<field name="group" ref="hotel.group_hotel"/>
|
||||
</record> -->
|
||||
|
||||
<!-- <record model="ir.model.button" id="operation_draft_button">
|
||||
<field name="name">draft</field>
|
||||
<field name="model" search="[('model', '=', 'hotel.operation')]"/>
|
||||
</record>
|
||||
<record model="ir.model.button-res.group" id="operation_draft_button_group_hotel">
|
||||
<field name="button" ref="operation_draft_button"/>
|
||||
<field name="group" ref="hotel.group_hotel"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.button" id="operation_confirm_button">
|
||||
<field name="name">open</field>
|
||||
<field name="model" search="[('model', '=', 'hotel.operation')]"/>
|
||||
</record>
|
||||
<record model="ir.model.button-res.group" id="operation_confirm_button_group_hotel">
|
||||
<field name="button" ref="operation_confirm_button"/>
|
||||
<field name="group" ref="hotel.group_hotel"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.button" id="hotel_operation_check_out_button">
|
||||
<field name="name">close</field>
|
||||
<field name="string">Closed</field>
|
||||
<field name="model" search="[('model', '=', 'hotel.operation')]"/>
|
||||
</record>
|
||||
<record model="ir.model.button-res.group" id="hotel_operation_check_out_button_group_hotel">
|
||||
<field name="button" ref="hotel_operation_check_out_button"/>
|
||||
<field name="group" ref="group_hotel"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.access" id="access_operation">
|
||||
<field name="model" search="[('model', '=', 'hotel.operation')]"/>
|
||||
<field name="perm_read" eval="False"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
<record model="ir.model.access" id="access_operation_group_hotel">
|
||||
<field name="model" search="[('model', '=', 'hotel.operation')]"/>
|
||||
<field name="group" ref="group_hotel"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="True"/>
|
||||
</record>
|
||||
<record model="ir.model.access" id="access_operation_group_hotel_admin">
|
||||
<field name="model" search="[('model', '=', 'hotel.operation')]"/>
|
||||
<field name="group" ref="group_hotel_admin"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="True"/>
|
||||
<field name="perm_create" eval="True"/>
|
||||
<field name="perm_delete" eval="True"/>
|
||||
</record> -->
|
||||
<menuitem name="Migration Report" sequence="60" parent="menu_reporting"
|
||||
id="menu_migration_report" action="act_open_migration"/>
|
||||
|
||||
<!-- <record model="ir.ui.view" id="operation_maintenance_view_tree">
|
||||
<field name="model">hotel.operation.maintenance</field>
|
||||
|
@ -242,164 +182,6 @@ this repository contains the full copyright notices and license terms. -->
|
|||
<field name="perm_delete" eval="True"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="open_migration_start_view_form">
|
||||
<field name="model">hotel.open_migration.start</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">open_migration_form</field>
|
||||
</record>
|
||||
<record model="ir.action.wizard" id="act_open_migration">
|
||||
<field name="name">Open Migration Report</field>
|
||||
<field name="wiz_name">hotel.open_migration</field>
|
||||
</record>
|
||||
<record model="ir.action.report" id="report_migration">
|
||||
<field name="name">Migration Report</field>
|
||||
<field name="model"></field>
|
||||
<field name="report_name">hotel.migration</field>
|
||||
<field name="report">hotel/migration_report.fods</field>
|
||||
<field name="template_extension">ods</field>
|
||||
</record>
|
||||
<menuitem name="Migration Report" sequence="60" parent="menu_reporting"
|
||||
id="menu_migration_report" action="act_open_migration"/>
|
||||
|
||||
<record model="ir.action.act_window.domain" id="act_operation_form_domain_draft">
|
||||
<field name="name">Draft</field>
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="domain" eval="[('state', '=', 'draft')]" pyson="1"/>
|
||||
<field name="count" eval="True"/>
|
||||
<field name="act_window" ref="act_operation_tree"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.domain" id="act_operation_form_domain_check_in_today">
|
||||
<field name="name">Check In Today</field>
|
||||
<field name="sequence" eval="30"/>
|
||||
<field name="domain" eval="[
|
||||
('start_date', '=', Date()),
|
||||
('state', '!=', 'cancelled')
|
||||
]" pyson="1"/>
|
||||
<field name="count" eval="True"/>
|
||||
<field name="act_window" ref="act_operation_tree"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.domain" id="act_operation_form_domain_check_out_today">
|
||||
<field name="name">Check Out Today</field>
|
||||
<field name="sequence" eval="30"/>
|
||||
<field name="domain" eval="[
|
||||
('end_date', '=', Date())
|
||||
]" pyson="1"/>
|
||||
<field name="count" eval="True"/>
|
||||
<field name="act_window" ref="act_operation_tree"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.domain" id="act_operation_form_domain_open">
|
||||
<field name="name">Open</field>
|
||||
<field name="sequence" eval="30"/>
|
||||
<field name="domain" eval="[('state', '=', 'open')]" pyson="1"/>
|
||||
<field name="count" eval="True"/>
|
||||
<field name="act_window" ref="act_operation_tree"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.domain" id="act_operation_form_domain_all">
|
||||
<field name="name">All</field>
|
||||
<field name="sequence" eval="90"/>
|
||||
<field name="domain" eval="[]" pyson="1"/>
|
||||
<field name="act_window" ref="act_operation_tree"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.wizard" id="wizard_operation_check_out">
|
||||
<field name="name">Operation Check Out</field>
|
||||
<field name="wiz_name">hotel.operation.check_out</field>
|
||||
<field name="model">hotel.operation</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="operation_check_out_failed_view_form">
|
||||
<field name="model">hotel.operation.check_out.failed</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">operation_check_out_form</field>
|
||||
</record> -->
|
||||
|
||||
<!-- <record model="ir.ui.view" id="operation_change_room_view_form">
|
||||
<field name="model">hotel.operation.change_room.ask</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">operation_change_room_form</field>
|
||||
</record>
|
||||
<record model="ir.action.wizard" id="act_operation_change_room">
|
||||
<field name="name">Operation Change Room</field>
|
||||
<field name="wiz_name">hotel.operation.change_room</field>
|
||||
<field name="model">hotel.operation</field>
|
||||
</record>
|
||||
<record model="ir.action.keyword" id="act_operation_change_room_keyword">
|
||||
<field name="keyword">form_action</field>
|
||||
<field name="model">hotel.operation,-1</field>
|
||||
<field name="action" ref="act_operation_change_room"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="operation_transfer_operation_view_form">
|
||||
<field name="model">hotel.operation.transfer_operation.ask</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">operation_transfer_operation_form</field>
|
||||
</record>
|
||||
<record model="ir.action.wizard" id="act_operation_transfer_operation">
|
||||
<field name="name">Transfer Operation</field>
|
||||
<field name="wiz_name">hotel.operation.transfer_operation</field>
|
||||
<field name="model">hotel.operation</field>
|
||||
</record>
|
||||
<record model="ir.action.keyword" id="act_operation_transfer_operation_keyword">
|
||||
<field name="keyword">form_action</field>
|
||||
<field name="model">hotel.operation,-1</field>
|
||||
<field name="action" ref="act_operation_transfer_operation"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="operation_transfer_charge_view_form">
|
||||
<field name="model">hotel.operation.transfer_charge.ask</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">operation_transfer_charge_form</field>
|
||||
</record>
|
||||
<record model="ir.action.wizard" id="act_operation_transfer_charge">
|
||||
<field name="name">Transfer Charges</field>
|
||||
<field name="wiz_name">hotel.operation.transfer_charge</field>
|
||||
<field name="model">hotel.folio.charge</field>
|
||||
</record>
|
||||
<record model="ir.action.keyword" id="act_operation_transfer_charge_keyword">
|
||||
<field name="keyword">form_action</field>
|
||||
<field name="model">hotel.folio.charge,-1</field>
|
||||
<field name="action" ref="act_operation_transfer_charge"/>
|
||||
</record> -->
|
||||
|
||||
<!-- <record model="ir.action.report" id="report_operation_by_consumer">
|
||||
<field name="name">Operation By Consumer</field>
|
||||
<field name="model">hotel.folio.charge</field>
|
||||
<field name="report_name">hotel.folio.charge</field>
|
||||
<field name="report">hotel/operation_by_consumer.fodt</field>
|
||||
<field name="template_extension">odt</field>
|
||||
</record>
|
||||
<record model="ir.action.keyword" id="act_operation_by_consumer_keyword">
|
||||
<field name="keyword">form_print</field>
|
||||
<field name="model">hotel.folio.charge,-1</field>
|
||||
<field name="action" ref="report_operation_by_consumer"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.wizard" id="wizard_hotel_operation_bill">
|
||||
<field name="name">Bill</field>
|
||||
<field name="wiz_name">hotel.operation.bill</field>
|
||||
</record>
|
||||
<record model="ir.action.keyword" id="act_hotel_operation_bill_keyword">
|
||||
<field name="keyword">form_action</field>
|
||||
<field name="model">hotel.operation,-1</field>
|
||||
<field name="action" ref="wizard_hotel_operation_bill"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.button" id="operation_bill_button">
|
||||
<field name="name">bill</field>
|
||||
<field name="string">Bill</field>
|
||||
<field name="model" search="[('model', '=', 'hotel.operation')]"/>
|
||||
</record>
|
||||
<record model="ir.model.button-res.group" id="hotel_operation_bill_button_group_hotel">
|
||||
<field name="button" ref="operation_bill_button"/>
|
||||
<field name="group" ref="hotel.group_hotel"/>
|
||||
</record> -->
|
||||
|
||||
<!-- <record model="ir.action.wizard" id="wizard_operation_advance_voucher">
|
||||
<field name="name">Voucher Advance</field>
|
||||
<field name="wiz_name">account_voucher.advance_voucher</field>
|
||||
<field name="model">hotel.operation</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.report" id="statistics_by_month_report">
|
||||
<field name="name">Statistics by Month Report</field>
|
||||
<field name="model"></field>
|
||||
|
|
29
locale/es.po
29
locale/es.po
|
@ -604,11 +604,11 @@ msgstr "Email"
|
|||
|
||||
msgctxt "field:hotel.folio.guest,first_family_name:"
|
||||
msgid "First Family Name"
|
||||
msgstr ""
|
||||
msgstr "Primer Apellido"
|
||||
|
||||
msgctxt "field:hotel.folio.guest,first_name:"
|
||||
msgid "First Name"
|
||||
msgstr ""
|
||||
msgstr "Primer Nombre"
|
||||
|
||||
msgctxt "field:hotel.folio.guest,folio:"
|
||||
msgid "Booking Line"
|
||||
|
@ -1285,7 +1285,7 @@ msgid "Amenities"
|
|||
msgstr "Comodidades"
|
||||
|
||||
msgctxt "model:ir.action,name:act_board_folio_view"
|
||||
msgid "Board Folios"
|
||||
msgid "Folios"
|
||||
msgstr "Folios"
|
||||
|
||||
msgctxt "model:ir.action,name:act_booking_form"
|
||||
|
@ -1316,6 +1316,10 @@ msgctxt "model:ir.action,name:act_migration_city_form"
|
|||
msgid "Migration City"
|
||||
msgstr "Ciudad de Migración"
|
||||
|
||||
msgctxt "model:ir.action,name:act_open_migration"
|
||||
msgid "Open Migration Report"
|
||||
msgstr "Reporte de Migración"
|
||||
|
||||
msgctxt "model:ir.action,name:act_room_classification_form"
|
||||
msgid "Room Classification"
|
||||
msgstr "Clasificación de Habitación"
|
||||
|
@ -1372,6 +1376,10 @@ msgctxt "model:ir.action,name:report_invoice_income_daily"
|
|||
msgid "Report Invoice Income Daily"
|
||||
msgstr "Relacion Diaria de Caja"
|
||||
|
||||
msgctxt "model:ir.action,name:report_migration"
|
||||
msgid "Migration Report"
|
||||
msgstr "Reporte de Migración"
|
||||
|
||||
msgctxt "model:ir.action,name:report_registration_card"
|
||||
msgid "Registration Card"
|
||||
msgstr "Tarjeta de Registro"
|
||||
|
@ -1469,9 +1477,14 @@ msgstr "Saliendo Hoy"
|
|||
|
||||
msgctxt ""
|
||||
"model:ir.action.act_window.domain,name:act_guest_moves_form_domain_no_show_today"
|
||||
msgid "No Show Yesterday"
|
||||
msgid "No Show Today"
|
||||
msgstr "No Presentados Hoy"
|
||||
|
||||
msgctxt ""
|
||||
"model:ir.action.act_window.domain,name:act_guest_moves_form_domain_present"
|
||||
msgid "Present"
|
||||
msgstr "Presentes"
|
||||
|
||||
msgctxt "model:ir.action.act_window.domain,name:act_service_form_domain_all"
|
||||
msgid "All"
|
||||
msgstr "Todos"
|
||||
|
@ -1561,7 +1574,7 @@ msgstr ""
|
|||
|
||||
msgctxt "model:ir.message,text:msg_payterm_missing"
|
||||
msgid "The payment term is missing!"
|
||||
msgstr ""
|
||||
msgstr "Falta la forma de pago!"
|
||||
|
||||
msgctxt "model:ir.message,text:msg_reservation_checkin"
|
||||
msgid "The reservation already has check_in or check_out"
|
||||
|
@ -1633,7 +1646,7 @@ msgstr "Comodidades"
|
|||
|
||||
msgctxt "model:ir.ui.menu,name:menu_hotel_board_folio"
|
||||
msgid "Board Folios"
|
||||
msgstr "Folios"
|
||||
msgstr "Front Desk"
|
||||
|
||||
msgctxt "model:ir.ui.menu,name:menu_hotel_booking_daily"
|
||||
msgid "Booking Daily Report"
|
||||
|
@ -1691,6 +1704,10 @@ msgctxt "model:ir.ui.menu,name:menu_location_tree"
|
|||
msgid "Locations"
|
||||
msgstr "Ubicaciones"
|
||||
|
||||
msgctxt "model:ir.ui.menu,name:menu_migration_report"
|
||||
msgid "Migration Report"
|
||||
msgstr "Reporte de Migración"
|
||||
|
||||
msgctxt "model:ir.ui.menu,name:menu_reporting"
|
||||
msgid "Reporting"
|
||||
msgstr "Reportes"
|
||||
|
|
|
@ -4,7 +4,6 @@ DROP TABLE hotel_service CASCADE;
|
|||
DROP TABLE hotel_operation_maintenance CASCADE;
|
||||
|
||||
ALTER TABLE hotel_booking_line RENAME TO hotel_folio;
|
||||
|
||||
trytond-admin -c .trytond/trytond.conf -v -d TAYLOR -u account
|
||||
|
||||
UPDATE hotel_folio
|
||||
|
@ -18,7 +17,35 @@ INSERT INTO booking_vouchers_rel (voucher, booking)
|
|||
ON hf.operation = ov.operation
|
||||
WHERE ov.voucher NOT IN (SELECT voucher FROM booking_vouchers_rel);
|
||||
|
||||
DROP TABLE hotel_folio_guest;
|
||||
ALTER TABLE hotel_booking_guest RENAME TO hotel_folio_guest;
|
||||
ALTER TABLE hotel_folio_guest RENAME COLUMN folio TO folio_old;
|
||||
ALTER TABLE hotel_folio_guest RENAME COLUMN booking_line TO folio;
|
||||
|
||||
|
||||
INSERT INTO hotel_folio_guest (
|
||||
birthday, doc_number, email, first_family_name, first_name,
|
||||
folio, mobile, name, nationality, origin_country, party,
|
||||
second_family_name, second_name, sex, target_country, type_document,
|
||||
type_guest, type_person
|
||||
)
|
||||
SELECT
|
||||
birthday, doc_number, email, first_family_name, first_name,
|
||||
folio, mobile, name, nationality, origin_country, party,
|
||||
second_family_name, second_name, sex, target_country, type_document,
|
||||
type_guest, type_person
|
||||
FROM dup_hotel_folio_guest WHERE id IN (3, 4, 5);
|
||||
|
||||
|
||||
-- INSERT INTO hotel_folio_guest (folio, party)
|
||||
-- SELECT fo.id AS folio, og.party AS party
|
||||
-- FROM hotel_operation_guest AS og
|
||||
-- JOIN hotel_folio AS fo ON fo.operation = og.operation
|
||||
-- WHERE og.party NOT IN (SELECT party FROM hotel_folio_guest)
|
||||
-- GROUP BY og.party, fo.id ORDER BY fo.id;
|
||||
|
||||
|
||||
-- ALTER TABLE hotel_operation_guest RENAME TO hotel_folio;
|
||||
-- DROP TABLE operation_vouchers_rel;
|
||||
-- DROP TABLE hotel_folio_charge CASCADE;
|
||||
-- DROP TABLE hotel_folio CASCADE;
|
||||
|
|
Loading…
Reference in New Issue