<odoo>
  <record id="action_report_ir" model="ir.actions.report">
        <field name="name">IR Form</field>
        <field name="model">sos_ir</field>
        <field name="report_type">qweb-pdf</field>
        <field name="report_name">sos_inventory.report_ir</field>
        <field name="report_file">sos_inventory.report_ir</field>
        <field name="binding_model_id" eval="False"/>
        <field name="binding_type">report</field>
    </record>

<template id="report_ir">
    <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">Inward Register</h2>
                    <br></br>
                    <!-- HTML Table -->
                    <table class="table table-bordered">
                        <tbody>
                            <tr>
                                <td colspan="2" rowspan="2"><span class="column">Supplier Name</span> <br></br><br></br><t t-esc="o.supplier_name.supplier_name"/> <br></br>
                                 <t t-foreach="o.supplier_address.split(',')" t-as="part">
                                        <t t-esc="part"/><br/>
                                    </t></td>
                                <td class="column">P.O. No</td><td><t t-esc="o.po_no.po_no"/></td>
                            </tr>
                            <tr>
                                <td class="column">Invoice/DC No</td><td><t t-esc="o.dc_no.dc_no"/></td>
                            </tr>

                
                        </tbody>
                    </table>
                                       <br></br>

                     <table class="table table-bordered">
                        <tbody>
       
                            <tr>
                                <td class="column">Received On</td><td class="column">Receiving Department</td><td class="column">Received By</td><td class="column">No of Bags/Barrels/Rolls/Boxes Received</td>
                            </tr>
                            <tr>
                                <td><t t-esc="o.received_date"/></td><td><t t-esc="o.receiving_dept"/></td><td><t t-esc="o.receiving_by.name"/></td><td><t t-esc="o.parcel_count"/></td>
                            </tr>
                
                        </tbody>
                    </table>
                   <br></br>
                 <table class="table table-bordered">
                <tbody>    
                <tr class="column">
                 <td>S.No</td><td>Batch No</td><td>Name</td><td>Quantity</td>
                 </tr>
                 <t t-if="o.received_goods_type == 'Materials'">
                 <t t-foreach="o.line_ids_material" t-as="line_items">
                 <tr>
                 <td><t t-esc="line_items.s_no"/></td>
                 <td><t t-esc="line_items.batch_no"/></td>
                 <td><t t-esc="line_items.component_id.part_no"/></td>
                 <td><t t-esc="line_items.qty"/></td>
                 </tr>
                 </t>
                 </t>
                <t t-if="o.received_goods_type == 'SFG'">
                 <t t-foreach="o.line_ids_sfg" t-as="line_items">
                 <tr>
                 <td><t t-esc="line_items.s_no"/></td>
                 <td><t t-esc="line_items.batch_no"/></td>
                 <td><t t-esc="line_items.component_id.name"/></td>
                 <td><t t-esc="line_items.qty"/></td>
                 </tr>
                 </t>
                 </t>
                <t t-if="o.received_goods_type == 'FG'">
                 <t t-foreach="o.line_ids_fg" t-as="line_items">
                 <tr>
                 <td><t t-esc="line_items.s_no"/></td>
                 <td><t t-esc="line_items.batch_no"/></td>
                 <td><t t-esc="line_items.component_id.name"/></td>
                 <td><t t-esc="line_items.qty"/></td>
                 </tr>
                 </t>
                 </t>
                 
                 </tbody>
                 </table>
                 <div style="float: right; width: 50%; padding: 10px; box-sizing: border-box;">
                   Stores-RM/PM In Charge Sign
                    <br/><br/>
                   <img t-if="o.stores_approval_image" t-att-src="'data:image/png;base64,%s' % (o.stores_approval_image.decode())" alt="Approved By Sign"/>
                               
                              
                            </div>
                </div>
 
            </t>
        </t>
    </t>
</template>

</odoo>
