<?xml version="1.0" encoding="utf-8"?>
<odoo>

    <!-- views -->

    <record id="hotel_property_views_form" model="ir.ui.view">
        <field name="name">hotel_property_views_form</field>
        <field name="model">hotel.property</field>
        <field name="arch" type="xml">
            <form string="Hotel Configuration">
                <sheet>
                    <label for="name" class="oe_edit_only"/>
                    <h1>
                        <field name="name" class="oe_inline" />
                    </h1>
                    <field name="company_id" class="oe_inline" />
                    <notebook>
                        <page string="General Information" name="hotel_general">
                            <group>
                            </group>
                        </page>
                        <page string="Settings" name="hotel_settings">
                            <group colspan="4" col="4" string="Price and Restriction Plans">
                                <field name="default_pricelist_id" required="True" />
                                <field name="default_restriction_id" required="True" />
                            </group>
                            <group string="Timezone">
                                <field name="tz" widget="timezone_mismatch"/>
                            </group>
                            <group colspan="4" col="4" string="Check-in hours">
                                <field name="default_arrival_hour" />
                                <field name="default_departure_hour"  />
                            </group>
                            <group colspan="4" col="4" string="Cancellation policies">
                                <field name="default_cancel_policy_days" />
                                <field name="default_cancel_policy_percent"  />
                            </group>
                        </page>
                        <page string="Rooms" name="hotel_rooms">
                            <group>
                                <field name="room_type_ids"/>
                                <field name="room_ids"/>
                            </group>
                        </page>
                    </notebook>
                </sheet>
            </form>
        </field>
    </record>

    <record id="hotel_property_views_tree" model="ir.ui.view">
        <field name="name">hotel_property_views_tree</field>
        <field name="model">hotel.property</field>
        <field name="arch" type="xml">
            <tree string="Hotel settings summary">
                <field name="name"/>
                <field name="company_id"/>
            </tree>
        </field>
    </record>

    <!-- actions -->

    <record id="hotel_property_action" model="ir.actions.act_window">
        <field name="name">Hotels</field>
        <field name="res_model">hotel.property</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,form</field>
    </record>

    <!-- menus -->

    <menuitem action="hotel_property_action" id="hotel_property_menu" parent="base.menu_users" sequence="10"/>

</odoo>
