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

    <record id="view_ai_ielts_log_form" model="ir.ui.view">
        <field name="name">encoach.ai.ielts.generation.log.form</field>
        <field name="model">encoach.ai.ielts.generation.log</field>
        <field name="arch" type="xml">
            <form string="IELTS Generation Log">
                <header>
                    <field name="status" widget="statusbar" statusbar_visible="generating,format_check,examiner_review,approved"/>
                </header>
                <sheet>
                    <group>
                        <group>
                            <field name="skill"/>
                            <field name="attempts"/>
                            <field name="examiner_id"/>
                        </group>
                        <group>
                            <field name="created_at"/>
                        </group>
                    </group>
                    <notebook>
                        <page string="Brief" name="brief">
                            <field name="brief"/>
                        </page>
                        <page string="Format Check Result" name="format_check">
                            <field name="format_check_result"/>
                        </page>
                        <page string="Band Check Result" name="band_check">
                            <field name="band_check_result"/>
                        </page>
                    </notebook>
                </sheet>
            </form>
        </field>
    </record>

    <record id="view_ai_ielts_log_list" model="ir.ui.view">
        <field name="name">encoach.ai.ielts.generation.log.list</field>
        <field name="model">encoach.ai.ielts.generation.log</field>
        <field name="arch" type="xml">
            <list string="IELTS Generation Logs">
                <field name="skill"/>
                <field name="status" widget="badge" decoration-info="status == 'generating'" decoration-warning="status == 'examiner_review'" decoration-success="status == 'approved'" decoration-danger="status == 'rejected'"/>
                <field name="attempts"/>
                <field name="examiner_id"/>
                <field name="created_at"/>
            </list>
        </field>
    </record>

    <record id="action_ai_ielts_log" model="ir.actions.act_window">
        <field name="name">IELTS Generation Logs</field>
        <field name="res_model">encoach.ai.ielts.generation.log</field>
        <field name="view_mode">list,form</field>
    </record>

</odoo>
