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

    <!-- Form view of hotel room type class-->
    <record model="ir.ui.view" id="hotel_room_closure_reason_view_form">
        <field name="name">hotel.room.closure.reason.form</field>
        <field name="model">room.closure.reason</field>
        <field name="arch" type="xml">
            <form string="Hotel Room Closure Reason">
                <sheet>
                    <field name="name" />
                    <field name="description" />
                    <field name="hotel_ids" widget="many2many_tags"
                        options="{'no_create': True,'no_open': True}"/>
                </sheet>
            </form>
        </field>
    </record>

    <!-- Tree view of hotel room type class -->
    <record model="ir.ui.view" id="hotel_room_closure_reason_view_tree">
        <field name="name">>hotel.room.closure.reason.tree</field>
        <field name="model">room.closure.reason</field>
        <field name="arch" type="xml">
            <tree string="Hotel Room Closure Reason">
                <field name="name"/>
                <field name="description" />
            </tree>
        </field>
    </record>

    <!-- Action for hotel room type class -->
    <record model="ir.actions.act_window" id="open_hotel_room_closure_reason_form_tree">
        <field name="name">Room Closure Reason</field>
        <field name="res_model">room.closure.reason</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,form</field>
    </record>
    <menuitem name="Closure Reasons" id="menu_hotel_room_closure_reason_form_tree"
        action="open_hotel_room_closure_reason_form_tree" sequence="25"
        parent="hotel.configuration_others" />

</odoo>
