<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
    <template id="report_timesheet">
        <t t-call="report.html_container">
        <tr t-foreach="Shifts" t-as="shift">
            <div class="page" style="page-break-after:always">
                <div class="row mt0 mb0">
                    <div class="col-xs-1" style="font-size:60px"><bold>1</bold></div>
                    <div class="col-xs-11">
                        <div class="row mt0 mb0">
                            <div class="col-xs-3" style="text-align:right;font-size:20px">Date: </div>
                            <div class="col-xs-9" style="font-size:20px"><span t-esc="shift['shift'].begin_date_without_time_string"/></div>
                        </div>
                        <div class="row mt0 mb0">
                            <div class="col-xs-3" style="text-align:right;font-size:20px">Équipe: </div>
                            <div class="col-xs-5" style="font-size:20px"><span t-esc="shift['shift'].name"/></div>
                        </div>
                    </div>
                </div>

                <table class="table table-bordered">
                    <thead>
                        <tr>
                            <th style="text-align:center" width="52.33%">Membre Programmé</th>
                            <th style="text-align:center" width="47.67%">Membre Présent</th>
                        </tr>
                    </thead>
                </table>

                <table class="table table-bordered">
                    <thead>
                        <tr style="font-size:9px;background:#DDDDDD">
                            <th width="6%">Statut</th>
                            <th width="6%">Services<br/>Dus</th>
                            <th width="8%">Qualité</th>
                            <th width="8%">Numéro</th>
                            <th width="22%">Nom</th>
                            <th width="6%" style="text-align:center">Remplacé<br/>??</th>
                            <th width="8%">Numéro</th>
                            <th width="28%">Nom</th>
                            <th width="8%">Signature<br/>départ</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr t-foreach="shift['registrations']" t-as="registration" style="font-size:13px">
                            <td></td>
                            <td></td>
                            <td></td>
                            <td style="padding: 4px"><span t-esc="registration['registration'].partner_id.barcode_base"/></td>
                            <td style="font-size:11px;padding: 4px"><span t-esc="registration['registration'].name"/></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                        </tr>
                        <t t-set="nb_lines" t-value="(((shift['registration_number']+shift['ftop_number'])*3/2)//33+1)*33"/>
                        <t t-set="nb_free_lines" t-value="nb_lines-shift['registration_number']-shift['ftop_number']-1"/>
                        <tr t-foreach="int(nb_free_lines*2/3)" t-as="i" style="font-size:13px">
                            <td style="padding: 4px"><font color="white">_</font></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                        </tr>
                        <tr>
                            <td colspan="9" style="text-align:center;font-size:12px"><bold>**---VACATIONS---**</bold></td>
                        </tr>
                        <tr t-foreach="shift['ftop']" t-as="ftop_data" style="font-size:13px">
                            <t t-value="ftop_data[0]" t-set="ftop"/>
                            <t t-value="ftop_data[1]" t-set="is_on_leave"/>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td style="padding: 4px"><span t-esc="ftop.partner_id.barcode_base"/></td>
                            <td style="font-size:11px;padding: 1px"><span t-esc="ftop.name"/></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                        </tr>
                        <t t-set="nb_lines_ftop" t-value="int(nb_lines*1/3)"/>
                        <tr t-foreach="int(nb_free_lines*1/3)" t-as="i" style="font-size:13px">
                            <td style="padding: 4px"><font color="white">_</font></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                        </tr>
                    </tbody>
                </table>
            </div>

            <div class="page" style="page-break-after:always">
                <div class="row mt0 mb0">
                    <div class="col-xs-1" style="font-size:60px"><bold>2</bold></div>
                    <div class="col-xs-11">
                        <div class="row mt0 mb0">
                            <div class="col-xs-3" style="text-align:right;font-size:20px">Date: </div>
                            <div class="col-xs-9" style="font-size:20px"><span t-esc="shift['shift'].begin_date_without_time_string"/></div>
                        </div>
                        <div class="row mt0 mb0">
                            <div class="col-xs-3" style="text-align:right;font-size:20px">Équipe: </div>
                            <div class="col-xs-5" style="font-size:20px"><span t-esc="shift['shift'].name"/></div>
                        </div>
                    </div>
                </div>
                <div class="row mt0 mb0">
                    <div class="col-xs-12" style="text-align:center;background:#DDDDDD"><h2>RATTRAPAGES</h2></div>
                </div>

                <table class="table table-bordered">
                    <thead>
                        <tr>
                            <th style="text-align:center" width="58.33%">Membre Crédité</th>
                            <th style="text-align:center" width="41.67%">Membre Présent</th>
                        </tr>
                    </thead>
                </table>

                <table class="table table-bordered">
                    <thead>
                        <tr style="font-size:9px;background:#DDDDDD">
                            <th width="27.53%">Nom</th>
                            <th width="7.7%">Numéro</th>
                            <th width="7.7%">Jour</th>
                            <th width="7.7%">ABCD</th>
                            <th width="7.7%">Heure</th>
                            <th width="7%" style="text-align:center">Remplacé<br/>??</th>
                            <th width="7%">Numéro</th>
                            <th width="20.67%">Nom</th>
                            <th width="7%">Signature<br/>départ</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr t-foreach="15" t-as="i">
                            <td style="padding: 4px"><font color="white">_</font></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                        </tr>
                    </tbody>
                </table>

                <table class="table table-bordered">
                    <thead>
                        <tr>
                            <th width="100%">Coordinateurs, notez ci-dessous : Toute demande d’extension, tout cas d’attribution d’un seul rattrapage, toute autre info utile pour le Bureau des membres.</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr t-foreach="11" t-as="i">
                            <td style="padding: 4px"><font color="white">_</font></td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </tr>
        </t>
    </template>
</data>
</odoo>