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

    <record id="website_support_sla_view_form" model="ir.ui.view">
        <field name="name">website.support.sla form view</field>
        <field name="model">website.support.sla</field>
        <field name="arch" type="xml">
            <form>
                <group>
                    <field name="name"/>
                    <field name="description"/>
                    <field name="rule_ids">
                        <tree>
                            <field name="name"/>
                            <field name="response_time" widget="float_time"/>
                            <field name="countdown_condition"/>
                        </tree>
                    </field>
                    <field name="alert_ids">
                        <tree editable="bottom">
                            <field name="alert_time" widget="float_time"/>
                            <field name="type"/>
                        </tree>
                    </field>
                </group>
            </form>
        </field>
    </record>

    <record id="website_support_sla_rule_view_form" model="ir.ui.view">
        <field name="name">website.support.sla.rule form view</field>
        <field name="model">website.support.sla.rule</field>
        <field name="arch" type="xml">
            <form>
                <group>
                    <field name="name"/>
                    <field name="condition_ids">
                        <tree>
                            <field name="type"/>
                            <field name="display_value"/>
                        </tree>
                    </field>
                    <field name="response_time" widget="float_time"/>
                    <field name="countdown_condition"/>
                </group>
            </form>
        </field>
    </record>

    <record id="website_support_sla_rule_condition_view_form" model="ir.ui.view">
        <field name="name">website.support.sla.rule.condition form view</field>
        <field name="model">website.support.sla.rule.condition</field>
        <field name="arch" type="xml">
            <form>
                <group>
                    <field name="type"/>
                    <field name="category_id" attrs="{'invisible': [('type','!=', 'category')]}"/>
                    <field name="subcategory_id" attrs="{'invisible': [('type','!=', 'subcategory')]}"/>
                    <field name="priority_id" attrs="{'invisible': [('type','!=', 'priority')]}"/>
                </group>
            </form>
        </field>
    </record>

    <record id="website_support_sla_view_tree" model="ir.ui.view">
        <field name="name">website.support.sla tree view</field>
        <field name="model">website.support.sla</field>
        <field name="arch" type="xml">
            <tree>
                <field name="name"/>
            </tree>
        </field>
    </record>

    <record id="website_support_sla_action" model="ir.actions.act_window">
        <field name="name">Support SLA</field>
        <field name="res_model">website.support.sla</field>
        <field name="view_mode">tree,form</field>
        <field name="help" type="html">
            <p class="oe_view_nocontent_create">Create new SLA</p>
        </field>
    </record>

</odoo>