<odoo>
    <data>
        <record id="view_uber_config_tree" model="ir.ui.view">
            <field name="name">uber.config.tree</field>
            <field name="model">uber.config</field>
            <field name="arch" type="xml">
                <tree>
                    <field name="name"/>
                    <field name="environment"/>
                    <field name="active"/>
                </tree>
            </field>
        </record>

        <record id="view_uber_config_form" model="ir.ui.view">
            <field name="name">uber.config.form</field>
            <field name="model">uber.config</field>
            <field name="arch" type="xml">
                <form>
                    <header>
                        <button name="action_test_connection" string="Test Connection" type="object" class="oe_highlight"/>
                    </header>
                    <sheet>
                        <group>
                            <group string="API Credentials">
                                <field name="name"/>
                                <field name="client_id"/>
                                <field name="client_secret" password="True"/>
                                <field name="customer_id"/>
                                <field name="scope" placeholder="e.g. eats.deliveries"/>
                            </group>
                            <group string="Settings">
                                <field name="environment"/>
                                <field name="active"/>
                            </group>
                        </group>
                        <group string="Automation &amp; Fees">
                            <group>
                                <field name="timeout_minutes"/>
                                <field name="delivery_product_id" context="{'default_type': 'service'}"/>
                            </group>
                        </group>
                    </sheet>
                </form>
            </field>
        </record>

        <record id="action_uber_config" model="ir.actions.act_window">
            <field name="name">Uber Configuration</field>
            <field name="res_model">uber.config</field>
            <field name="view_mode">tree,form</field>
        </record>

        <!-- ROOT MENU ITEM -->
        <menuitem id="menu_uber_root" 
                  name="Uber Integration" 
                  web_icon="dine360_uber,static/description/icon.png"
                  sequence="100"/>

        <menuitem id="menu_uber_config" 
                  name="Settings" 
                  parent="menu_uber_root" 
                  action="action_uber_config" 
                  sequence="10"/>
    </data>
</odoo>
