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

        <template id="report_ticket">
            <style>
                .font{
                font-size:14px;
                font-family:"Helvetica"
                }
                @page{
                margin-top:1%;
                size: A4;
                }
            </style>
            <t t-call="web.html_container">
                <t t-call="web.external_layout">
                    <div class="page" style="font-family: 'Odoo Unicode Support Noto';">
                        <br/>
                        <br/>
                        <br/>
                        <div class="oe_structure" id="report_ticket_structure"/>
                        <t t-foreach="get_data" t-as="ticket_data">
                            <div class="font">
                                <div class="page">
                                    <br></br>
                                    <br></br>
                                    <br></br>
                                    <div class="text-center">
                                        <h3>
                                            <b>Hall Ticket</b>
                                        </h3>
                                        (
                                        <span t-out="ticket_data['exam'] if ticket_data['exam'] else ''"/>
                                        <span t-out="ticket_data['exam_code'] if ticket_data['exam_code'] else ''"/>
                                        )
                                    </div>
                                    <br></br>

                                    <table width="100%" style="font-size:14px;">
                                        <tbody>
                                            <tr>
                                                <td>
                                                    <table width="100%">
                                                        <tbody>
                                                            <tr>
                                                                <td style="padding:10px;">
                                                                    <b>Student Name :</b>
                                                                    <span t-esc="ticket_data['student']"/>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td style="padding:10px;">
                                                                    <b>Roll No :</b>
                                                                    <span t-out="ticket_data['roll_number']  if  ticket_data['roll_number']  else ''"/>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td style="padding:10px;">
                                                                    <b>Course :</b>
                                                                    <span t-out="ticket_data['course']  if  ticket_data['course']  else ''"/>
                                                                </td>
                                                            </tr>
                                                        </tbody>
                                                    </table>
                                                </td>

                                                <td>
                                                    <table width="100%">
                                                        <tbody>
                                                            <tr>
                                                                <td>

                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td class="text-right" style="text-align: center;">
                                                                    <img t-if="ticket_data['image']" alt="Student Image"
                                                                         style="padding-top: 19px; padding-bottom:26px; "
                                                                         t-att-src="image_data_uri(ticket_data['image'])"
                                                                         width="75"/>
                                                                </td>
                                                            </tr>
                                                        </tbody>
                                                    </table>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                    <br></br>
                                    <br></br>
                                    <table class="table table-bordered">
                                        <thead class="text-center"
                                               style="background-color:#eeeeee; font-size:14px; font-weight:600;">
                                            <th class="text-center">Subject</th>
                                            <th class="text-center">Date</th>
                                            <th class="text-center">Time</th>
                                            <th class="text-center">Supervisor Sign</th>
                                        </thead>
                                        <tbody class="text-center" style="font-size:12px;">
                                            <tr t-foreach="ticket_data['line']" t-as='s'>
                                                <td>
                                                    <span t-out="s['subject'] if  s['subject']  else ''"/>
                                                </td>
                                                <td>
                                                    <span t-out="s['date'] if  s['date'] else ''" t-options="{'widget':'date'}"/>
                                                </td>
                                                <td>
                                                    <span t-esc="s['time']"/>
                                                </td>
                                                <td>
                                                    <span t-out="s['sup_sign']  if  s['sup_sign']  else ''"/>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                            <p style="page-break-after:always"></p>
                        </t>
                    </div>
                </t>
            </t>
        </template>

</odoo>
