<?xml version="1.0" encoding="UTF-8"?>
<odoo>
    <record id="holiday_report_pdf" model="ir.actions.report">
        <field name="name">Holiday Report</field>
        <field name="model">company.resource.calendar</field>
        <field name="report_type">qweb-pdf</field>
        <field name="report_name">company_public_holidays_kanak.holiday_report</field>
        <field name="report_file">company_public_holidays_kanak.holiday_report</field>
        <field name="binding_model_id" ref="model_company_resource_calendar" />
        <field name="binding_type">report</field>
    </record>
    <template id="holiday_report">
        <t t-call="web.html_container">
            <t t-foreach="docs" t-as="o">
                <t t-call="company_public_holidays_kanak.holiday_report_document" />
            </t>
        </t>
    </template>
    <template id="holiday_report_document">
        <t t-call="web.external_layout">
            <div class="page">
                <h3>Public Holiday Report <span t-esc="o.year_list" /></h3>
                <div>
                    <table class="table  table-bordered  table-sm o_main_table" style="margin-top: 50px; text-align:center;">
                        <tr>
                            <th>Name</th>
                            <th>Start Date</th>
                            <th>End Date</th>
                        </tr>
                        <t t-foreach="o.company_global_leave_ids" t-as="cgl">
                            <tr>
                                <td>
                                    <span t-esc="cgl.name" />
                                </td>
                                <td>
                                    <span t-esc="cgl.date_from" />
                                </td>
                                <td>
                                    <span t-esc="cgl.date_to" />
                                </td>
                            </tr>
                        </t>
                    </table>
                </div>
            </div>
        </t>
    </template>
</odoo>