<?xml version="1.0" encoding="UTF-8"?>
<odoo>
        <record id="view_op_attendance_type_tree" model="ir.ui.view">
            <field name="name">op.attendance.type.list</field>
            <field name="model">op.attendance.type</field>
            <field name="priority" eval="8"/>
            <field name="arch" type="xml">
                <list string="Attendance Type">
                    <field name="name"/>
                    <field name="present"/>
                    <field name="absent"/>
                    <field name="excused"/>
                    <field name="late"/>
                    <field name="company_id" groups="base.group_multi_company" optional="show"/>
                </list>
            </field>
        </record>

        <record id="view_op_attendance_type_form" model="ir.ui.view">
            <field name="name">op.attendance.type.form</field>
            <field name="model">op.attendance.type</field>
            <field name="priority" eval="8"/>
            <field name="arch" type="xml">
                <form string="Attendance Type">
                    <header/>
                    <sheet>
                        <field name="active" invisible="1"/>
                        <widget name="web_ribbon" title="Archived" bg_color="bg-danger"
                                invisible="active == True"/>
                        <group>
                            <group col="4" colspan="4">
                                <field name="name"/>
                                <field name="company_id" groups="base.group_multi_company" optional="show"/>
                            </group>
                            <group col="4" string="Student Should Be Marked As" name="student_marked_As">
                                <field name="present"/>
                                <field name="absent"/>
                                <field name="excused"/>
                                <field name="late"/>
                            </group>
                        </group>

                    </sheet>
                    <chatter/>
                </form>
            </field>
        </record>

        <record id="view_op_attendance_type_search" model="ir.ui.view">
            <field name="name">op.attendance.type.search</field>
            <field name="model">op.attendance.type</field>
            <field name="priority" eval="8"/>
            <field name="arch" type="xml">
                <search string="Attendance Type">
                    <field name="name"/>
                    <filter string="Archived" name="inactive"
                            domain="[('active', '=', False)]"/>
                    <newline/>
                    <group>
                        <filter string="Name" name="group_by_attendance_register_name"
                                domain="[]" context="{'group_by':'name'}"/>
                    </group>
                </search>
            </field>
        </record>

        <record model="ir.actions.act_window" id="act_open_op_attendance_type_view">
            <field name="name">Attendance Types</field>
            <field name="path">attendance-type</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">op.attendance.type</field>
            <field name="binding_view_types">form</field>
            <field name="view_mode">list,form</field>
            <field name="search_view_id" ref="view_op_attendance_type_search"/>
            <field name="domain">[]</field>
            <field name="context">{}</field>
        </record>

        <record model="ir.actions.act_window.view" id="act_open_op_attendance_type_view_form">
            <field name="act_window_id" ref="act_open_op_attendance_type_view"/>
            <field name="sequence" eval="20"/>
            <field name="view_mode">form</field>
            <field name="view_id" ref="view_op_attendance_type_form"/>
        </record>

        <record model="ir.actions.act_window.view" id="act_open_op_attendance_type_view_tree">
            <field name="act_window_id" ref="act_open_op_attendance_type_view"/>
            <field name="sequence" eval="10"/>
            <field name="view_mode">list</field>
            <field name="view_id" ref="view_op_attendance_type_tree"/>
        </record>
</odoo>
