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

        <!-- ============================================================ -->
        <!-- DEMO EMPLOYEES WITH CANADIAN PAYROLL FIELDS                   -->
        <!-- ============================================================ -->
        
        <!-- Update existing demo employees with Canadian fields -->
        <record id="hr.employee_admin" model="hr.employee">
            <field name="employment_status">active</field>
            <field name="hire_date">2020-01-15</field>
            <field name="pay_schedule">semi_monthly</field>
            <field name="employee_number">EMP001</field>
            <field name="payment_method">direct_deposit</field>
            <field name="sin_number">123456789</field>
            <field name="home_street">123 Main Street</field>
            <field name="home_city">Toronto</field>
            <field name="home_province">ON</field>
            <field name="home_postal_code">M5V 2K7</field>
            <field name="home_country">Canada</field>
            <field name="federal_td1_amount">16129.00</field>
            <field name="provincial_claim_amount">12399.00</field>
            <field name="t4_dental_code">3</field>
            <field name="communication_language">E</field>
            <field name="emergency_first_name">Jane</field>
            <field name="emergency_last_name">Doe</field>
            <field name="emergency_relationship">Spouse</field>
            <field name="emergency_phone">416-555-0100</field>
        </record>

        <!-- Demo Employee 1: Active full-time -->
        <record id="demo_employee_john" model="hr.employee">
            <field name="name">John Smith</field>
            <field name="employment_status">active</field>
            <field name="hire_date">2022-03-01</field>
            <field name="pay_schedule">semi_monthly</field>
            <field name="employee_number">EMP002</field>
            <field name="payment_method">direct_deposit</field>
            <field name="sin_number">987654321</field>
            <field name="home_street">456 Oak Avenue</field>
            <field name="home_street2">Unit 12</field>
            <field name="home_city">Vancouver</field>
            <field name="home_province">BC</field>
            <field name="home_postal_code">V6B 1A1</field>
            <field name="home_country">Canada</field>
            <field name="federal_td1_amount">16129.00</field>
            <field name="provincial_claim_amount">12399.00</field>
            <field name="t4_dental_code">3</field>
            <field name="communication_language">E</field>
            <field name="preferred_name">Johnny</field>
            <field name="gender_identity">male</field>
            <field name="billing_rate">75.00</field>
            <field name="billable_by_default" eval="True"/>
            <field name="emergency_first_name">Sarah</field>
            <field name="emergency_last_name">Smith</field>
            <field name="emergency_relationship">Wife</field>
            <field name="emergency_phone">604-555-0200</field>
            <field name="emergency_email">sarah.smith@email.com</field>
        </record>

        <!-- Demo Employee 2: On Leave -->
        <record id="demo_employee_maria" model="hr.employee">
            <field name="name">Maria Garcia</field>
            <field name="employment_status">on_leave</field>
            <field name="hire_date">2021-06-15</field>
            <field name="pay_schedule">biweekly</field>
            <field name="employee_number">EMP003</field>
            <field name="payment_method">direct_deposit</field>
            <field name="sin_number">456789123</field>
            <field name="home_street">789 Pine Road</field>
            <field name="home_city">Montreal</field>
            <field name="home_province">QC</field>
            <field name="home_postal_code">H2X 1Y6</field>
            <field name="home_country">Canada</field>
            <field name="federal_td1_amount">16129.00</field>
            <field name="provincial_claim_amount">12399.00</field>
            <field name="t4_dental_code">1</field>
            <field name="communication_language">F</field>
            <field name="gender_identity">female</field>
            <field name="emergency_first_name">Carlos</field>
            <field name="emergency_last_name">Garcia</field>
            <field name="emergency_relationship">Brother</field>
            <field name="emergency_phone">514-555-0300</field>
        </record>

        <!-- Demo Employee 3: Terminated (for ROE testing) -->
        <record id="demo_employee_terminated" model="hr.employee">
            <field name="name">Robert Wilson</field>
            <field name="employment_status">terminated</field>
            <field name="hire_date">2020-09-01</field>
            <field name="last_day_of_work">2025-11-30</field>
            <field name="roe_reason_code">A00</field>
            <field name="pay_schedule">semi_monthly</field>
            <field name="employee_number">EMP004</field>
            <field name="payment_method">cheque</field>
            <field name="sin_number">789123456</field>
            <field name="home_street">321 Elm Street</field>
            <field name="home_city">Calgary</field>
            <field name="home_province">AB</field>
            <field name="home_postal_code">T2P 1J9</field>
            <field name="home_country">Canada</field>
            <field name="federal_td1_amount">16129.00</field>
            <field name="provincial_claim_amount">12399.00</field>
            <field name="t4_dental_code">2</field>
            <field name="communication_language">E</field>
            <field name="roe_issued" eval="False"/>
        </record>

        <!-- Demo Employee 4: High earner (for CPP2 testing) -->
        <record id="demo_employee_executive" model="hr.employee">
            <field name="name">Elizabeth Chen</field>
            <field name="employment_status">active</field>
            <field name="hire_date">2019-01-02</field>
            <field name="pay_schedule">semi_monthly</field>
            <field name="employee_number">EMP005</field>
            <field name="payment_method">direct_deposit</field>
            <field name="sin_number">111222333</field>
            <field name="home_street">1000 Bay Street</field>
            <field name="home_street2">Penthouse</field>
            <field name="home_city">Toronto</field>
            <field name="home_province">ON</field>
            <field name="home_postal_code">M5S 2B4</field>
            <field name="home_country">Canada</field>
            <field name="federal_td1_amount">16129.00</field>
            <field name="federal_additional_tax">500.00</field>
            <field name="provincial_claim_amount">12399.00</field>
            <field name="t4_dental_code">3</field>
            <field name="communication_language">E</field>
            <field name="billing_rate">250.00</field>
        </record>

        <!-- ============================================================ -->
        <!-- DEMO ROE (Record of Employment)                               -->
        <!-- ============================================================ -->
        
        <record id="demo_roe_1" model="hr.roe">
            <field name="employee_id" ref="demo_employee_terminated"/>
            <field name="last_day_paid">2025-11-30</field>
            <field name="final_pay_period_end">2025-11-30</field>
            <field name="reason_code">A</field>
            <field name="total_insurable_hours">1820.00</field>
            <field name="total_insurable_earnings">52000.00</field>
            <field name="contact_name">HR Manager</field>
            <field name="contact_phone">416-555-1000</field>
            <field name="communication_language">E</field>
            <field name="state">draft</field>
        </record>

        <!-- ROE Pay Period Lines -->
        <record id="demo_roe_pp_1" model="hr.roe.pay.period">
            <field name="roe_id" ref="demo_roe_1"/>
            <field name="sequence">1</field>
            <field name="amount">2166.67</field>
        </record>
        <record id="demo_roe_pp_2" model="hr.roe.pay.period">
            <field name="roe_id" ref="demo_roe_1"/>
            <field name="sequence">2</field>
            <field name="amount">2166.67</field>
        </record>
        <record id="demo_roe_pp_3" model="hr.roe.pay.period">
            <field name="roe_id" ref="demo_roe_1"/>
            <field name="sequence">3</field>
            <field name="amount">2166.67</field>
        </record>
        <record id="demo_roe_pp_4" model="hr.roe.pay.period">
            <field name="roe_id" ref="demo_roe_1"/>
            <field name="sequence">4</field>
            <field name="amount">2166.67</field>
        </record>

        <!-- ============================================================ -->
        <!-- DEMO TAX REMITTANCE                                           -->
        <!-- ============================================================ -->
        
        <!-- October 2025 Remittance - Paid -->
        <record id="demo_remittance_oct" model="hr.tax.remittance">
            <field name="period_type">monthly</field>
            <field name="period_start">2025-10-01</field>
            <field name="period_end">2025-10-31</field>
            <field name="due_date">2025-11-15</field>
            <field name="cpp_employee">1850.00</field>
            <field name="cpp_employer">1850.00</field>
            <field name="cpp2_employee">125.00</field>
            <field name="cpp2_employer">125.00</field>
            <field name="ei_employee">720.00</field>
            <field name="ei_employer">1008.00</field>
            <field name="income_tax">8500.00</field>
            <field name="payment_date">2025-11-14</field>
            <field name="payment_method">cra_my_business</field>
            <field name="payment_reference">CRA-2025-10-001</field>
        </record>

        <!-- November 2025 Remittance - Due Soon -->
        <record id="demo_remittance_nov" model="hr.tax.remittance">
            <field name="period_type">monthly</field>
            <field name="period_start">2025-11-01</field>
            <field name="period_end">2025-11-30</field>
            <field name="due_date">2025-12-15</field>
            <field name="cpp_employee">1920.00</field>
            <field name="cpp_employer">1920.00</field>
            <field name="cpp2_employee">130.00</field>
            <field name="cpp2_employer">130.00</field>
            <field name="ei_employee">750.00</field>
            <field name="ei_employer">1050.00</field>
            <field name="income_tax">8750.00</field>
        </record>

        <!-- December 2025 Remittance - Draft -->
        <record id="demo_remittance_dec" model="hr.tax.remittance">
            <field name="period_type">monthly</field>
            <field name="period_start">2025-12-01</field>
            <field name="period_end">2025-12-31</field>
            <field name="due_date">2026-01-15</field>
            <field name="cpp_employee">0</field>
            <field name="cpp_employer">0</field>
            <field name="cpp2_employee">0</field>
            <field name="cpp2_employer">0</field>
            <field name="ei_employee">0</field>
            <field name="ei_employer">0</field>
            <field name="income_tax">0</field>
        </record>

        <!-- ============================================================ -->
        <!-- DEMO T4 SUMMARY AND SLIPS                                     -->
        <!-- ============================================================ -->
        
        <!-- T4 Summary for 2024 -->
        <record id="demo_t4_summary_2024" model="hr.t4.summary">
            <field name="tax_year">2024</field>
            <field name="contact_name">Payroll Manager</field>
            <field name="contact_phone">416-555-2000</field>
            <field name="total_remittances">150000.00</field>
            <field name="state">filed</field>
            <field name="filing_date">2025-02-28</field>
        </record>

        <!-- T4 Slip for John Smith 2024 -->
        <record id="demo_t4_slip_john_2024" model="hr.t4.slip">
            <field name="summary_id" ref="demo_t4_summary_2024"/>
            <field name="employee_id" ref="demo_employee_john"/>
            <field name="employment_income">65000.00</field>
            <field name="cpp_employee">3867.50</field>
            <field name="cpp2_employee">0</field>
            <field name="ei_employee">1049.12</field>
            <field name="income_tax">12500.00</field>
            <field name="cpp_employer">3867.50</field>
            <field name="cpp2_employer">0</field>
            <field name="ei_employer">1468.77</field>
        </record>

        <!-- T4 Slip for Maria Garcia 2024 -->
        <record id="demo_t4_slip_maria_2024" model="hr.t4.slip">
            <field name="summary_id" ref="demo_t4_summary_2024"/>
            <field name="employee_id" ref="demo_employee_maria"/>
            <field name="employment_income">55000.00</field>
            <field name="cpp_employee">3272.50</field>
            <field name="cpp2_employee">0</field>
            <field name="ei_employee">902.00</field>
            <field name="income_tax">9800.00</field>
            <field name="cpp_employer">3272.50</field>
            <field name="cpp2_employer">0</field>
            <field name="ei_employer">1262.80</field>
        </record>

        <!-- T4 Slip for Elizabeth Chen (High Earner) 2024 -->
        <record id="demo_t4_slip_elizabeth_2024" model="hr.t4.slip">
            <field name="summary_id" ref="demo_t4_summary_2024"/>
            <field name="employee_id" ref="demo_employee_executive"/>
            <field name="employment_income">150000.00</field>
            <field name="cpp_employee">4034.10</field>
            <field name="cpp2_employee">396.00</field>
            <field name="ei_employee">1077.48</field>
            <field name="income_tax">42000.00</field>
            <field name="cpp_employer">4034.10</field>
            <field name="cpp2_employer">396.00</field>
            <field name="ei_employer">1508.47</field>
        </record>

        <!-- T4 Summary for 2025 (Draft) -->
        <record id="demo_t4_summary_2025" model="hr.t4.summary">
            <field name="tax_year">2025</field>
            <field name="contact_name">Payroll Manager</field>
            <field name="contact_phone">416-555-2000</field>
            <field name="state">draft</field>
        </record>

        <!-- ============================================================ -->
        <!-- DEMO TAX YEARLY RATES (Legacy model for backward compat)      -->
        <!-- ============================================================ -->
        
        <!-- CPP 2025 -->
        <record id="demo_tax_cpp_2025" model="tax.yearly.rates">
            <field name="ded_type">cpp</field>
            <field name="emp_contribution_rate">5.95</field>
            <field name="employer_contribution_rate">5.95</field>
            <field name="exemption">3500.00</field>
            <field name="max_cpp">4034.10</field>
        </record>

        <!-- EI 2025 -->
        <record id="demo_tax_ei_2025" model="tax.yearly.rates">
            <field name="ded_type">ei</field>
            <field name="ei_rate">1.64</field>
            <field name="ei_earnings">65700.00</field>
            <field name="emp_ei_amount">1077.48</field>
            <field name="employer_ei_amount">1508.47</field>
        </record>

        <!-- Federal Tax 2025 -->
        <record id="demo_tax_federal_2025" model="tax.yearly.rates">
            <field name="tax_type">federal</field>
            <field name="canada_emp_amount">1433.00</field>
            <field name="fed_tax_credit">16129.00</field>
        </record>

        <!-- Provincial Tax (Ontario) 2025 -->
        <record id="demo_tax_provincial_on_2025" model="tax.yearly.rates">
            <field name="tax_type">provincial</field>
            <field name="provincial_tax_credit">12399.00</field>
        </record>

    </data>
</odoo>
