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

    <!-- Action to open INE Codes list -->
    <act_window
        id="action_cardex"
        name="Action cardex"
        res_model="cardex"
        view_mode="tree,form" />
    <act_window
        id="action_cardex_download"
        name="Action cardex download"
        res_model="cardex"
        view_mode="form" />         <!-- Menu item to open INE Codes list -->
    <menuitem
        id="menu_cardex"
        name="Cardex"
        parent="hotel.hotel_reports_menu"
        sequence="25"
        action="action_cardex" />

    <record id="view_form_cardex" model="ir.ui.view">
        <field name="name">Cardex Form</field>
        <field name="model">cardex</field>
        <field name="arch" type="xml">
            <form>
                <sheet>
                    <group name="group_top">
                        <group name="group_left">
                            <field name="partner_id" required="True"/>
                            <field name="enter_date"/>
                            <field name="exit_date"/>
                        </group>
                        <group name="group_left">
                            <field name="reservation_id"/>
                        </group>
                    </group>
                </sheet>
            </form>
        </field>
    </record>

    <record id="view_tree_cardex" model="ir.ui.view">
        <field name="name">Cardex Tree</field>
        <field name="model">cardex</field>
        <field name="arch" type="xml">
            <tree>
                <field name="partner_id" string="Client name"/>
                <field name="enter_date"/>
                <field name="exit_date"/>
                <field name="reservation_id"/>
                <!-- button type="action" class="oe_stat_button" id="cardex_smart_button" icon="fa-bed" /-->
            </tree>
        </field>
    </record>

</odoo>
