<?xml version="1.0"?>
<odoo>

    <!-- FORM Virtual Room -->
    <record id="virtual_room_view_form" model="ir.ui.view">
        <field name="name">virtual.room.view.form</field>
        <field name="model">hotel.virtual.room</field>
        <field name="arch" type="xml">
            <form string="Virtual Room">
                <sheet>
                    <div class="oe_button_box" name="button_box">
                        <button name="toggle_active" type="object"
                                class="oe_stat_button" icon="fa-archive">
                            <field name="active" widget="boolean_button"
                                options='{"terminology": "archive"}'/>
                        </button>
                    </div>
                    <group colspan="4">
                    <group>
                        <field name="name"/>
                        <field name="virtual_code"/>
                        <field name="list_price"/>
                    </group>
                    <group>
                        <field name="total_rooms_count"/>
                        <field name="max_real_rooms"/>
                        <field name="room_type_ids" widget="many2many_tags" options="{'no_create': True}"/>
                    </group>
                    </group>
                    <group colspan="4">
                        <group>
                            <field name="room_ids"/>
                        </group>
                        <group>
                            <field name="service_ids"/>
                        </group>
                    </group>
                </sheet>
            </form>
        </field>
    </record>

    <!-- TREE Virtual Room -->
   <record id="virtual_room_view_tree" model="ir.ui.view">
        <field name="name">virtual.room.view.tree</field>
        <field name="model">hotel.virtual.room</field>
        <field name="arch" type="xml">
            <tree string="Virtual Rooms">
                <field name="name"/>
                <field name="virtual_code"/>
                <field name="room_ids"/>
                <field name="room_type_ids"/>
                <field name="total_rooms_count"/>
                <field name="max_real_rooms"/>
                <field name="service_ids"/>
            </tree>
        </field>
    </record>

    <record model="ir.actions.act_window" id="virtual_room_action_form">
        <field name="name">Virtual Rooms</field>
        <field name="res_model">hotel.virtual.room</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,form</field>
   </record>

    <!-- MENUS -->
   <menuitem name="Virtual rooms" id="virtual_room_menu"
        action="virtual_room_action_form" sequence="40"
        parent="hotel.menu_hotel_room"/>

 </odoo>
