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

    <!-- =================================================== Rooms =================================================== -->
    <!-- Form view of hotel room -->
    <record model="ir.ui.view" id="hotel_shared_room_view_form">
      <field name="name">hotel.shared.room.form</field>
      <field name="model">hotel.shared.room</field>
      <field name="arch" type="xml">
        <form string="Hotel Shared 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>
            <div class="oe_title">
              <label for="name" string="Name" />
              <h1>
                <field name="name" />
              </h1>
            </div>
            <notebook>
              <page name="information_hotel_shared_shared_room" string="Information">
                <group colspan="4" col="4">
                  <field name="floor_id" string="Ubication" />
                  <field name="room_type_id" string="Room Type" />
                  <field name="beds" />
                  <field name="sequence" />
                </group>
                <group>
                     <field name="bed_ids" />
                </group>
             </page>
              <page string="Descriptions">
                <group>
                    <field name="description_sale" colspan="2" string="Name in reports"/>
                </group>
              </page>
            </notebook>
          </sheet>
        </form>
      </field>
    </record>

    <!-- Kanban view of hotel room -->
    <record model="ir.ui.view" id="hotel_shared_shared_room_view_kanban">
        <field name="name">hotel.shared.room.kanban</field>
        <field name="model">hotel.shared.room</field>
        <field name="type">kanban</field>
        <field name="arch" type="xml">
            <kanban class="o_kanban_mobile" >
                <attribute name="group_create">false</attribute>
                <field name="id"/>
                <field name="name"/>
                <templates>
                    <t t-name="kanban-box">
                        <div t-attf-class="oe_kanban_global_click">
                            <div class="oe_kanban_details">
                                <ul>
                                    <li class="mb4">
                                        <strong><field name="name"/></strong>
                                    </li>
                                    <li class="mb4">Room Type: <field name="room_type_id"/></li>
                                    <li class="badge mb4">
                                        <strong>Beds <field name="beds"/></strong>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </t>
                </templates>
            </kanban>
        </field>
    </record>

    <!-- Search view of hotel room -->
    <record model="ir.ui.view" id="hotel_shared_shared_room_view_search">
        <field name="name">hotel.shared.room.search</field>
        <field name="model">hotel.shared.room</field>
        <field name="arch" type="xml">
            <search string="Hotel Shared Room">
                <field name="name" />
                <field name="room_type_id" />
                <field name="beds" />
            </search>
        </field>
    </record>

    <!-- Tree view of hotel room -->
    <record model="ir.ui.view" id="hotel_shared_room_view_tree">
        <field name="name">hotel.shared.room.tree</field>
        <field name="model">hotel.shared.room</field>
        <field name="arch" type="xml">
            <tree string="Hotel Shared Room">
                <field name="name" />
                <field name="room_type_id" />
                <field name="beds" />
                <field name="sequence" />
            </tree>
        </field>
    </record>


    <!-- Action for hotel room -->
    <record model="ir.actions.act_window" id="action_hotel_shared_room_form">
        <field name="name">Hotel Shared Room</field>
        <field name="res_model">hotel.shared.room</field>
        <field name="view_type">form</field>
        <!-- <field name="context">{'default_isroom':1,'default_rental':1}
        </field> -->
        <field name="view_id" ref="hotel_shared_room_view_tree" />
        <field name="view_mode">kanban,tree,form</field>
    </record>

    <menuitem name="Shared Rooms" id="menu_open_hotel_shared_room_form" action="action_hotel_shared_room_form"
        sequence="5" parent="hotel.menu_hotel_room" />

</odoo>
