<odoo>
  <record id="action_report_sales_plan" model="ir.actions.report">
        <field name="name">Sales Target</field>
        <field name="model">sos_sales_plan_target</field>
        <field name="report_type">qweb-pdf</field>
        <field name="report_name">sos_sales.report_sales_plan</field>
        <field name="report_file">sos_sales.report_sales_plan</field>
        <field name="binding_model_id" eval="False"/>
        <field name="binding_type">report</field>
    </record>

    <template id="report_sales_plan">
        <t t-call="web.html_container">
            <t t-foreach="docs" t-as="o">
                <t t-call="web.external_layout">
                    <link rel="stylesheet" href="/sos_inventory/static/src/css/style.css" />
                    <div class="page">
                        <h2 style="text-align:center">Sales Target</h2>
                        <br/>
                        <table class="table table-bordered">
                            <tbody>
                                <tr>
                                    <td class="column">Sales Executive</td>
                                    <td><t t-esc="o.sales_executive.name"/></td>
                                    <td class="column">Financial Year</td>
                                    <td><t t-esc="o.financial_year"/></td>
                                </tr>
                            </tbody>
                        </table>
                        <br/>
                        <t t-if="o.product_summary">
    <div t-raw="o.product_summary"/>
</t>
   <br/>
                                             <table class="table_custom"   style="box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 8px;">
 <thead><tr style="background-color: #635a99;"><td style="color:#fff" colspan="6"><b>Quarter Wise Target (Rupees In Lakhs)</b></td></tr></thead>
 <tr style="background-color: lavender;">
 <td class="column">Quarter</td>
 <td class="column">I</td>
 <td class="column">II</td>
 <td class="column">III</td>
 <td class="column">IV</td>
  <td class="column">Total</td>
 </tr>
  <tr>
  <td style="background-color: lavender;" class="column">Target</td>
<td><t t-esc="'{:.2f}'.format(o.total_q1_value)"/></td>
<td><t t-esc="'{:.2f}'.format(o.total_q2_value)"/></td>
<td><t t-esc="'{:.2f}'.format(o.total_q3_value)"/></td>
<td><t t-esc="'{:.2f}'.format(o.total_q4_value)"/></td>
 <td style="font-size:13px;font-size: 15px;background-color: lavender;
    font-weight: bold;"><t t-esc="'{:.2f}'.format(o.total_annual_value)" nolabel="1" /></td>
 </tr>
 </table>
              <br></br>
               <table class="table_custom"   style="box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 8px;">
 <thead><tr style="background-color: #635a99;"><td style="color:#fff" colspan="14"><b>Month Wise Target (Rupees In Lakhs)</b></td></tr></thead>
  <tr style="background-color: lavender;">
    <td class="column">Month</td>
    <td class="column">Apr</td>
    <td class="column">May</td>
    <td class="column">Jun</td>
    <td class="column">Jul</td>
    <td class="column">Aug</td>
    <td class="column">Sep</td>
    <td class="column">Oct</td>
    <td class="column">Nov</td>
    <td class="column">Dec</td>
    <td class="column">Jan</td>
    <td class="column">Feb</td>
    <td class="column">Mar</td>
    <td class="column">Total</td>
    </tr>
    <tr>
    <td style="background-color: lavender;" class="column">Target</td>
    <td><t t-esc="'{:.2f}'.format(o.total_april_value)"/></td>
    <td><t t-esc="'{:.2f}'.format(o.total_may_value)"/></td>
    <td><t t-esc="'{:.2f}'.format(o.total_june_value)"/></td>
    <td><t t-esc="'{:.2f}'.format(o.total_july_value)"/></td>
    <td><t t-esc="'{:.2f}'.format(o.total_august_value)"/></td>
    <td><t t-esc="'{:.2f}'.format(o.total_september_value)"/></td>
    <td><t t-esc="'{:.2f}'.format(o.total_october_value)"/></td>
    <td><t t-esc="'{:.2f}'.format(o.total_november_value)"/></td>
    <td><t t-esc="'{:.2f}'.format(o.total_december_value)"/></td>
    <td><t t-esc="'{:.2f}'.format(o.total_january_value)"/></td>
    <td><t t-esc="'{:.2f}'.format(o.total_february_value)"/></td>
    <td><t t-esc="'{:.2f}'.format(o.total_march_value)"/></td>
    <td style="background-color: lavender;font-size:13px;font-size: 15px;
    font-weight: bold;"><t t-esc="'{:.2f}'.format(o.total_annual_value)"/></td>
    </tr>
 </table>
 <br></br>
 <table class="table table-bordered">
  <thead>
  <tr style="background-color:#635a99;color:#fff"><td class="column" colspan="30">Detailed Report</td></tr>
    <tr style="background-color:#eee; font-weight:bold;">
    <th rowspan="3">S.No</th>
    <th rowspan="3">Region/Vertical</th>
        <th rowspan="3">Client Name</th>
        <th rowspan="3">Product</th>
        <th rowspan="3">Location</th>
        <th rowspan="3">Date (Billed)</th>
        <th colspan="6">Q1</th>
        <th colspan="6">Q2</th>
        <th colspan="6">Q3</th>
        <th colspan="6">Q4</th>
    </tr>
    <tr style="background-color:#f6f6f6;">
        <th colspan="2">Apr</th>
        <th colspan="2">May</th>
        <th colspan="2">Jun</th>
        <th colspan="2">Jul</th>
        <th colspan="2">Aug</th>
        <th colspan="2">Sep</th>
        <th colspan="2">Oct</th>
        <th colspan="2">Nov</th>
        <th colspan="2">Dec</th>
        <th colspan="2">Jan</th>
        <th colspan="2">Feb</th>
        <th colspan="2">Mar</th>
    </tr>
    <tr style="background-color:#fefefe;">
        <th>Qty</th>
        <th>Value</th>
        <th>Qty</th>
        <th>Value</th>
        <th>Qty</th>
        <th>Value</th>
        <th>Qty</th>
        <th>Value</th>
        <th>Qty</th>
        <th>Value</th>
        <th>Qty</th>
        <th>Value</th>
        <th>Qty</th>
        <th>Value</th>
        <th>Qty</th>
        <th>Value</th>
        <th>Qty</th>
        <th>Value</th>
        <th>Qty</th>
        <th>Value</th>
        <th>Qty</th>
        <th>Value</th>
        <th>Qty</th>
        <th>Value</th>
    </tr>
</thead>
    <t t-foreach="o.line_ids" t-as="line_items">
    <tr>
    <td><t t-esc="line_items_index + 1"/></td>
    <td><t t-esc="line_items.region"/></td>
    <td><t t-esc="line_items.customer_name.customer_name"/></td>
    <td><t t-esc="line_items.product"/></td>
    <td><t t-esc="line_items.location"/></td>
    <td><t t-esc="line_items.date_billed"/></td>
    <!-- April -->
    <td><t t-esc="line_items.apr_qty"/></td>
    <td><t t-esc="line_items.apr_value"/></td>

    <!-- May -->
    <td><t t-esc="line_items.may_qty"/></td>
    <td><t t-esc="line_items.may_value"/></td>

    <!-- June -->
    <td><t t-esc="line_items.jun_qty"/></td>
    <td><t t-esc="line_items.jun_value"/></td>

    <!-- July -->
    <td><t t-esc="line_items.jul_qty"/></td>
    <td><t t-esc="line_items.jul_value"/></td>

    <!-- August -->
    <td><t t-esc="line_items.aug_qty"/></td>
    <td><t t-esc="line_items.aug_value"/></td>

    <!-- September -->
    <td><t t-esc="line_items.sep_qty"/></td>
    <td><t t-esc="line_items.sep_value"/></td>

    <!-- October -->
    <td><t t-esc="line_items.oct_qty"/></td>
    <td><t t-esc="line_items.oct_value"/></td>

    <!-- November -->
    <td><t t-esc="line_items.nov_qty"/></td>
    <td><t t-esc="line_items.nov_value"/></td>

    <!-- December -->
    <td><t t-esc="line_items.dec_qty"/></td>
    <td><t t-esc="line_items.dec_value"/></td>

    <!-- January -->
    <td><t t-esc="line_items.jan_qty"/></td>
    <td><t t-esc="line_items.jan_value"/></td>

    <!-- February -->
    <td><t t-esc="line_items.feb_qty"/></td>
    <td><t t-esc="line_items.feb_value"/></td>

    <!-- March -->
    <td><t t-esc="line_items.mar_qty"/></td>
    <td><t t-esc="line_items.mar_value"/></td>

    </tr>
    </t>
</table>
                    </div>
                </t>
            </t>
        </t>
    </template>
</odoo>
