<?xml version="1.0" encoding="UTF-8"?>
<odoo>
    <data>
        <record model="ir.ui.view" id="exely_api_conf_view_list">
            <field name="name">exely.api.conf.tree</field>
            <field name="model">exely.api.conf</field>
            <field name="arch" type="xml">
                <list>
                    <field name="api_key"/>
                    <field name="api_url"/>
                </list>
            </field>
        </record>

        <record model="ir.ui.view" id="exely_api_conf_view_form">
            <field name="name">exely.api.conf.form</field>
            <field name="model">exely.api.conf</field>
            <field name="arch" type="xml">
                <form>
                    <header>
                        <button string="Test Connection" type="object" name="test_api_connection" class="btn-primary"/>
                    </header>
                    <sheet>
                        <div class="oe_title">
                            <h1><field name="api_url"/></h1>
                        </div>
                        <group>
                            <field name="api_key"/>
                        </group>
                    </sheet>                            
                </form>
            </field>
        </record>

        <record model="ir.actions.act_window" id="exely_api_conf_action">
            <field name="name">exely.api.conf</field>
            <field name="res_model">exely.api.conf</field>
            <field name="view_mode">list,form</field>
            <field name="help" type="html">
                <p class="o_view_nocontent_smiling_face">
                    Create your first raw bookings record.
                </p>
            </field>
        </record>

        <menuitem name="Exely Api Conf" id="exely_api_conf_submenu" parent="exely_integration_submenu" action="exely_api_conf_action" sequence="5" groups="base.group_system"/>
    </data>
</odoo>
