<?xml version="1.0"?>
<!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
    <data>

        <record model="ir.action.wizard" id="wizard_select_rooms">
            <field name="name">Select Rooms</field>
            <field name="wiz_name">hotel.booking.select_rooms</field>
            <field name="model">hotel.booking</field>
        </record>
        <record model="ir.ui.view" id="view_select_rooms_form">
            <field name="model">hotel.booking.select_rooms.ask</field>
            <field name="type">form</field>
            <field name="name">view_select_rooms</field>
        </record>

        <record model="ir.action.report" id="report_booking">
            <field name="name">Booking</field>
            <field name="model">hotel.booking</field>
            <field name="report_name">hotel.booking</field>
            <field name="report">hotel/booking.fodt</field>
            <field name="extension">pdf</field>
        </record>
        <record model="ir.action.keyword" id="report_booking_keyword">
            <field name="keyword">form_print</field>
            <field name="model">hotel.booking,-1</field>
            <field name="action" ref="report_booking"/>
        </record>

        <record model="ir.ui.view" id="booking_view_form">
            <field name="model">hotel.booking</field>
            <field name="type">form</field>
            <field name="name">booking_form</field>
        </record>
        <record model="ir.ui.view" id="booking_view_tree">
            <field name="model">hotel.booking</field>
            <field name="type">tree</field>
            <field name="name">booking_tree</field>
        </record>
        <record model="ir.action.act_window" id="act_booking_form">
            <field name="name">Booking</field>
            <field name="res_model">hotel.booking</field>
        </record>
        <record model="ir.action.act_window.view" id="act_booking_form_view1">
            <field name="sequence" eval="1"/>
            <field name="view" ref="booking_view_tree"/>
            <field name="act_window" ref="act_booking_form"/>
        </record>
        <record model="ir.action.act_window.view" id="act_booking_form_view2">
            <field name="sequence" eval="2"/>
            <field name="view" ref="booking_view_form"/>
            <field name="act_window" ref="act_booking_form"/>
        </record>
        <record model="ir.action.act_window.domain" id="act_booking_form_domain_offer">
            <field name="name">Offer</field>
            <field name="sequence" eval="10"/>
            <field name="domain" eval="[('state', '=', 'offer')]" pyson="1"/>
            <field name="count" eval="True"/>
            <field name="act_window" ref="act_booking_form"/>
        </record>
        <record model="ir.action.act_window.domain" id="act_booking_form_domain_confirmed">
            <field name="name">Confirmed</field>
            <field name="sequence" eval="20"/>
            <field name="domain" eval="[('state', '=', 'confirmed')]" pyson="1"/>
            <field name="count" eval="True"/>
            <field name="act_window" ref="act_booking_form"/>
        </record>
        <record model="ir.action.act_window.domain" id="act_booking_form_domain_no_show">
            <field name="name">No Show / Cancelled</field>
            <field name="sequence" eval="50"/>
            <field name="domain" eval="['OR',
                [('state', 'in', ['cancelled', 'not_show'])]
                ]" pyson="1"/>
            <field name="count" eval="True"/>
            <field name="act_window" ref="act_booking_form"/>
        </record>
        <record model="ir.action.act_window.domain" id="act_booking_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_booking_form"/>
        </record>
        <menuitem parent="menu_hotel" sequence="10" icon="hotel-booking"
            action="act_booking_form" id="menu_booking_form"/>

        <record model="ir.ui.view" id="booking_folio_view_tree">
            <field name="model">hotel.folio</field>
            <field name="type">tree</field>
            <field name="name">booking_folio_tree</field>
        </record>
        <record model="ir.ui.view" id="booking_folio_view_form">
            <field name="model">hotel.folio</field>
            <field name="type">form</field>
            <field name="name">booking_folio_form</field>
        </record>

        <record model="ir.model.button" id="booking_cancel_button">
            <field name="name">cancel</field>
            <field name="string">Cancel</field>
            <field name="confirm">Are you sure you want to cancel the booking?</field>
            <field name="model" search="[('model', '=', 'hotel.booking')]"/>
        </record>
        <record model="ir.model.button-res.group" id="booking_cancel_button_group_hotel">
            <field name="button" ref="booking_cancel_button"/>
            <field name="group" ref="hotel.group_hotel"/>
        </record>
        <record model="ir.model.button" id="booking_offer_button">
            <field name="name">offer</field>
            <field name="model" search="[('model', '=', 'hotel.booking')]"/>
        </record>
        <record model="ir.model.button-res.group" id="booking_offer_button_group_hotel">
            <field name="button" ref="booking_offer_button"/>
            <field name="group" ref="hotel.group_hotel"/>
        </record>

        <record model="ir.model.button" id="booking_confirm_button">
            <field name="name">confirm</field>
            <field name="model" search="[('model', '=', 'hotel.booking')]"/>
        </record>
        <record model="ir.model.button-res.group" id="booking_confirm_button_group_hotel">
            <field name="button" ref="booking_confirm_button"/>
            <field name="group" ref="hotel.group_hotel"/>
        </record>

        <record model="ir.model.button" id="booking_no_show_button">
            <field name="name">no_show</field>
            <field name="string">No Show</field>
            <field name="confirm">Are you sure you want to change to "Not Show" the booking?</field>
            <field name="model" search="[('model', '=', 'hotel.booking')]"/>
        </record>
        <record model="ir.model.button-res.group" id="booking_no_show_button_group_hotel">
            <field name="button" ref="booking_no_show_button"/>
            <field name="group" ref="hotel.group_hotel"/>
        </record>

        <!-- Model Access -->
        <record model="ir.model.access" id="access_booking">
            <field name="model" search="[('model', '=', 'hotel.booking')]"/>
            <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_booking_group_hotel">
            <field name="model" search="[('model', '=', 'hotel.booking')]"/>
            <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_booking_group_hotel_frontdesk">
            <field name="model" search="[('model', '=', 'hotel.booking')]"/>
            <field name="group" ref="group_hotel_frontdesk"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="True"/>
            <field name="perm_create" eval="True"/>
            <field name="perm_delete" eval="False"/>
        </record>
        <record model="ir.model.access" id="access_booking_group_hotel_admin">
            <field name="model" search="[('model', '=', 'hotel.booking')]"/>
            <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>

        <record model="ir.action.act_window" id="act_open_booking_invoices_form">
            <field name="name">Invoices</field>
            <field name="res_model">account.invoice</field>
            <field name="domain" pyson="1"
                eval="[('lines.origin.booking.id', '=', Eval('active_id'), 'hotel.folio')]"/>
        </record>
        <record model="ir.action.keyword" id="act_open_booking_invoices_keyword1">
            <field name="keyword">form_relate</field>
            <field name="model">hotel.booking,-1</field>
            <field name="action" ref="act_open_booking_invoices_form"/>
        </record>

        <record model="ir.action.report" id="report_booking_statement">
            <field name="name">Booking Statement</field>
            <field name="model">hotel.booking</field>
            <field name="report_name">hotel.booking_statement</field>
            <field name="report">hotel/statement.fodt</field>
            <field name="extension">pdf</field>
        </record>
        <record model="ir.action.keyword" id="report_booking_statement_keyword">
            <field name="keyword">form_print</field>
            <field name="model">hotel.booking,-1</field>
            <field name="action" ref="report_booking_statement"/>
        </record>

        <record model="ir.action.report" id="report_rooms_occupancy">
            <field name="name">Rooms Occupancy Report</field>
            <field name="model"></field>
            <field name="report_name">hotel.rooms_occupancy.report</field>
            <field name="report">hotel/rooms_occupancy.fods</field>
            <field name="template_extension">ods</field>
        </record>
        <record model="ir.ui.view" id="print_rooms_occupancy_start_view_form">
            <field name="model">hotel.print_rooms_occupancy.start</field>
            <field name="type">form</field>
            <field name="name">rooms_occupancy_start_form</field>
        </record>
        <record model="ir.action.wizard" id="wizard_print_rooms_occupancy">
            <field name="name">Rooms Occupancy</field>
            <field name="wiz_name">hotel.print_rooms_occupancy</field>
        </record>
        <menuitem parent="hotel.menu_reporting" id="menu_rooms_occupancy"
            action="wizard_print_rooms_occupancy"/>

        <record model="ir.action.report" id="report_revenue_forecast">
            <field name="name">Revenue Forecast Report</field>
            <field name="model"></field>
            <field name="report_name">hotel.revenue_forecast.report</field>
            <field name="report">hotel/revenue_forecast.fods</field>
            <field name="template_extension">ods</field>
        </record>
        <record model="ir.ui.view" id="print_revenue_forecast_start_view_form">
            <field name="model">hotel.print_revenue_forecast.start</field>
            <field name="type">form</field>
            <field name="name">revenue_forecast_start_form</field>
        </record>
        <record model="ir.action.wizard" id="wizard_print_revenue_forecast">
            <field name="name">Renevue Forecast</field>
            <field name="wiz_name">hotel.print_revenue_forecast</field>
        </record>
        <menuitem parent="hotel.menu_reporting" id="menu_revenue_forecast"
            action="wizard_print_revenue_forecast"/>

        <record model="ir.action.report" id="report_guests_list">
            <field name="name">Guests List Report</field>
            <field name="model"></field>
            <field name="report_name">hotel.guests_list.report</field>
            <field name="report">hotel/guests_list.fods</field>
            <field name="template_extension">ods</field>
        </record>
        <record model="ir.ui.view" id="print_guests_list_start_view_form">
            <field name="model">hotel.print_guests_list.start</field>
            <field name="type">form</field>
            <field name="name">guests_list_start_form</field>
        </record>
        <record model="ir.action.wizard" id="wizard_print_guests_list">
            <field name="name">Guests List</field>
            <field name="wiz_name">hotel.print_guests_list</field>
        </record>
        <menuitem parent="hotel.menu_reporting" id="menu_guests_list"
            action="wizard_print_guests_list"/>

        <record model="ir.action.wizard" id="wizard_booking_advance_voucher">
            <field name="name">Do Payment</field>
            <field name="wiz_name">account_voucher.advance_voucher</field>
            <field name="model">hotel.booking</field>
        </record>

        <record model="ir.action.report" id="booking_status_report">
            <field name="name">Booking Status Report</field>
            <field name="model"></field>
            <field name="report_name">hotel.booking_status.report</field>
            <field name="report">hotel/booking_status.fods</field>
            <field name="template_extension">ods</field>
        </record>
        <record model="ir.ui.view" id="print_booking_status_start_view_form">
            <field name="model">hotel.print_booking_status.start</field>
            <field name="type">form</field>
            <field name="name">booking_status_start_form</field>
        </record>
        <record model="ir.action.wizard" id="wizard_print_booking_status">
            <field name="name">Booking Status Report</field>
            <field name="wiz_name">hotel.booking_status</field>
        </record>
        <menuitem parent="hotel.menu_reporting" id="menu_hotel_booking_status"
            action="wizard_print_booking_status"/>

        <record model="ir.action.wizard" id="wizard_update_holder">
            <field name="name">Create / Update Guest</field>
            <field name="wiz_name">hotel.update_holder</field>
            <field name="model">hotel.booking</field>
        </record>
        <record model="ir.ui.view" id="update_holder_start_view_form">
            <field name="model">hotel.update_holder.start</field>
            <field name="type">form</field>
            <field name="name">update_holder_form</field>
        </record>

        <record model="ir.model.button" id="booking_bill_button">
            <field name="name">bill</field>
            <field name="string">Bill</field>
            <field name="confirm">Are you sure you want to bill the booking?</field>
            <field name="model" search="[('model', '=', 'hotel.booking')]"/>
        </record>
        <record model="ir.model.button-res.group"
            id="booking_bill_button_group_hotel">
            <field name="button" ref="booking_bill_button"/>
            <field name="group" ref="hotel.group_hotel"/>
        </record>

        <record model="ir.action.report" id="report_hotel_manager">
            <field name="name">Manager Report</field>
            <field name="model"></field>
            <field name="report_name">hotel.manager.report</field>
            <field name="report">hotel/manager.fods</field>
            <field name="template_extension">ods</field>
        </record>
        <record model="ir.ui.view" id="print_manager_start_view_form">
            <field name="model">hotel.print_manager.start</field>
            <field name="type">form</field>
            <field name="name">hotel_manager_start_form</field>
        </record>
        <record model="ir.action.wizard" id="wizard_hotel_print_manager">
            <field name="name">Manager Report</field>
            <field name="wiz_name">hotel.print_manager</field>
        </record>
        <menuitem parent="hotel.menu_reporting" id="menu_hotel_manager"
            action="wizard_hotel_print_manager"/>

        <record model="ir.action.wizard" id="wizard_statement_payment_form">
            <field name="name">Pay</field>
            <field name="wiz_name">hotel.payment_form</field>
        </record>
        <record model="ir.ui.view" id="statement_payment_view_form">
            <field name="model">hotel.payment_form.start</field>
            <field name="type">form</field>
            <field name="name">statement_payment_form</field>
        </record>

        <record model="ir.action.wizard" id="wizard_bill_booking">
            <field name="name">Bill Booking</field>
            <field name="wiz_name">hotel.bill_booking</field>
        </record>
        <record model="ir.ui.view" id="bill_booking_view_form">
            <field name="model">hotel.bill_booking.start</field>
            <field name="type">form</field>
            <field name="name">bill_booking_start_form</field>
        </record>

        <record model="ir.action.report" id="report_operation_forecast">
            <field name="name">Operation Forecast Report</field>
            <field name="model"></field>
            <field name="report_name">hotel.operation_forecast.report</field>
            <field name="report">hotel/operation_forecast.fods</field>
            <field name="template_extension">ods</field>
        </record>
        <record model="ir.ui.view" id="print_operation_forecast_start_view_form">
            <field name="model">hotel.print_operation_forecast.start</field>
            <field name="type">form</field>
            <field name="name">operation_forecast_start_form</field>
        </record>
        <record model="ir.action.wizard" id="wizard_print_operation_forecast">
            <field name="name">Operation Forecast</field>
            <field name="wiz_name">hotel.print_operation_forecast</field>
        </record>
        <menuitem parent="hotel.menu_reporting" id="menu_operation_forecast"
            action="wizard_print_operation_forecast"/>

        <record model="ir.action.report" id="report_revenue_segmentation">
            <field name="name">Revenue Segmentation Report</field>
            <field name="model"></field>
            <field name="report_name">hotel.revenue_segmentation.report</field>
            <field name="report">hotel/revenue_segmentation.fods</field>
            <field name="template_extension">ods</field>
        </record>
        <record model="ir.ui.view" id="revenue_segmentation_start_view_form">
            <field name="model">hotel.revenue_segmentation.start</field>
            <field name="type">form</field>
            <field name="name">revenue_segmentation_start_form</field>
        </record>
        <record model="ir.action.wizard" id="wizard_revenue_segmentation">
            <field name="name">Revenue Segmentation</field>
            <field name="wiz_name">hotel.revenue_segmentation</field>
        </record>
        <menuitem parent="hotel.menu_reporting" id="menu_revenue_segmentation"
            action="wizard_revenue_segmentation"/>

        <record model="ir.action.wizard" id="wizard_booking_update_taxes">
            <field name="name">Update Taxes</field>
            <field name="wiz_name">hotel.booking.update_taxes</field>
            <field name="model">hotel.booking</field>
        </record>
        <record model="ir.ui.view" id="booking_update_taxes_view_form">
            <field name="model">hotel.booking.update_taxes.start</field>
            <field name="type">form</field>
            <field name="name">booking_update_taxes_start_form</field>
        </record>
        <record model="ir.action.keyword" id="booking_update_taxes_keyword">
            <field name="keyword">form_action</field>
            <field name="model">hotel.booking,-1</field>
            <field name="action" ref="wizard_booking_update_taxes"/>
        </record>

    </data>
</tryton>
