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

    <record id="view_student_ability_form" model="ir.ui.view">
        <field name="name">encoach.student.ability.model.form</field>
        <field name="model">encoach.student.ability.model</field>
        <field name="arch" type="xml">
            <form string="Student Ability">
                <sheet>
                    <group>
                        <group>
                            <field name="student_id"/>
                            <field name="subject_id"/>
                            <field name="skill"/>
                        </group>
                        <group>
                            <field name="theta"/>
                            <field name="sem"/>
                            <field name="last_updated"/>
                        </group>
                    </group>
                </sheet>
            </form>
        </field>
    </record>

    <record id="view_student_ability_list" model="ir.ui.view">
        <field name="name">encoach.student.ability.model.list</field>
        <field name="model">encoach.student.ability.model</field>
        <field name="arch" type="xml">
            <list string="Student Abilities">
                <field name="student_id"/>
                <field name="skill"/>
                <field name="theta"/>
                <field name="sem"/>
                <field name="last_updated"/>
            </list>
        </field>
    </record>

    <record id="view_student_ability_search" model="ir.ui.view">
        <field name="name">encoach.student.ability.model.search</field>
        <field name="model">encoach.student.ability.model</field>
        <field name="arch" type="xml">
            <search string="Search Student Abilities">
                <field name="student_id"/>
                <separator/>
                <filter string="Listening" name="listening" domain="[('skill', '=', 'listening')]"/>
                <filter string="Reading" name="reading" domain="[('skill', '=', 'reading')]"/>
                <filter string="Writing" name="writing" domain="[('skill', '=', 'writing')]"/>
                <filter string="Speaking" name="speaking" domain="[('skill', '=', 'speaking')]"/>
                <filter string="Grammar" name="grammar" domain="[('skill', '=', 'grammar')]"/>
                <filter string="Vocabulary" name="vocabulary" domain="[('skill', '=', 'vocabulary')]"/>
                <separator/>
                <filter string="Student" name="group_student" context="{'group_by': 'student_id'}"/>
                <filter string="Subject" name="group_subject" context="{'group_by': 'subject_id'}"/>
            </search>
        </field>
    </record>

    <record id="action_student_ability" model="ir.actions.act_window">
        <field name="name">Student Abilities</field>
        <field name="res_model">encoach.student.ability.model</field>
        <field name="view_mode">list,form</field>
    </record>

</odoo>
