<odoo>
    <record id="action_report_achievement" model="ir.actions.report">
        <field name="name">Achievement Summary</field>
        <field name="model">sos_sales_achievement_report</field>
        <field name="report_type">qweb-pdf</field>
        <field name="report_name">sos_sales.action_report_achievement_template</field>
        <field name="print_report_name">'Achievement Summary - %s' % (object.sales_person.name)</field>
    </record>

    <template id="action_report_achievement_template">
        <t t-call="web.basic_layout">
            <t t-call="web.html_container">
                <t t-foreach="docs" t-as="doc">
                    <link rel="stylesheet" href="/sos_inventory/static/src/css/style.css?v=7"/>
                    <div class="page">
                    <table class="table_custom">
                    <tr><td class="column">Finalcial Year</td><td><t t-esc="doc.financial_year"/></td></tr>
                    <tr><td class="column">Sales Person</td><td><t t-esc="doc.sales_person.name"/></td></tr>
                    <tr><td class="column">Overall Target</td><td><t t-esc="doc.overall_target"/></td></tr>
                    </table>
                    <br></br>
                        <table class="table_custom">
                            <thead>
                                <tr style="background-color: lavender;">
                                    <th class="column">Month</th>
                                    <th class="column">April</th>
                                    <th class="column">May</th>
                                    <th class="column">June</th>
                                    <th class="column">July</th>
                                    <th class="column">August</th>
                                    <th class="column">September</th>
                                    <th class="column">October</th>
                                    <th class="column">November</th>
                                    <th class="column">December</th>
                                    <th class="column">January</th>
                                    <th class="column">February</th>
                                    <th class="column">March</th>
                                    <th class="column">Total</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td class="column" style="background-color: lavender;">Target</td>
                                    <td><t t-esc="doc.planned_target_april"/></td>
                                    <td><t t-esc="doc.planned_target_may"/></td>
                                    <td><t t-esc="doc.planned_target_june"/></td>
                                    <td><t t-esc="doc.planned_target_july"/></td>
                                    <td><t t-esc="doc.planned_target_august"/></td>
                                    <td><t t-esc="doc.planned_target_september"/></td>
                                    <td><t t-esc="doc.planned_target_october"/></td>
                                    <td><t t-esc="doc.planned_target_november"/></td>
                                    <td><t t-esc="doc.planned_target_december"/></td>
                                    <td><t t-esc="doc.planned_target_january"/></td>
                                    <td><t t-esc="doc.planned_target_february"/></td>
                                    <td><t t-esc="doc.planned_target_march"/></td>
                                    <td><t t-esc="doc.planned_target_total"/></td>
                                </tr>
                                <tr>
                                    <td class="column" style="background-color: lavender;">Sales</td>
                                    <td><t t-esc="doc.actual_target_april"/></td>
                                    <td><t t-esc="doc.actual_target_may"/></td>
                                    <td><t t-esc="doc.actual_target_june"/></td>
                                    <td><t t-esc="doc.actual_target_july"/></td>
                                    <td><t t-esc="doc.actual_target_august"/></td>
                                    <td><t t-esc="doc.actual_target_september"/></td>
                                    <td><t t-esc="doc.actual_target_october"/></td>
                                    <td><t t-esc="doc.actual_target_november"/></td>
                                    <td><t t-esc="doc.actual_target_december"/></td>
                                    <td><t t-esc="doc.actual_target_january"/></td>
                                    <td><t t-esc="doc.actual_target_february"/></td>
                                    <td><t t-esc="doc.actual_target_march"/></td>
                                    <td><t t-esc="doc.actual_target_total"/></td>
                                </tr>
                                <tr>
                                    <td class="column" style="background-color: lavender;">%</td>
                                    <td><t t-esc="doc.achievement_percentage_april"/></td>
                                    <td><t t-esc="doc.achievement_percentage_may"/></td>
                                    <td><t t-esc="doc.achievement_percentage_june"/></td>
                                    <td><t t-esc="doc.achievement_percentage_july"/></td>
                                    <td><t t-esc="doc.achievement_percentage_august"/></td>
                                    <td><t t-esc="doc.achievement_percentage_september"/></td>
                                    <td><t t-esc="doc.achievement_percentage_october"/></td>
                                    <td><t t-esc="doc.achievement_percentage_november"/></td>
                                    <td><t t-esc="doc.achievement_percentage_december"/></td>
                                    <td><t t-esc="doc.achievement_percentage_january"/></td>
                                    <td><t t-esc="doc.achievement_percentage_february"/></td>
                                    <td><t t-esc="doc.achievement_percentage_march"/></td>
                                    <td><t t-esc="doc.achievement_percentage_total"/></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </t>
            </t>
        </t>
    </template>
</odoo>
