<odoo>
    <data>
        <!-- Email template -->
        <record id="send_indent_plan_email_template" model="mail.template">
            <field name="name">Indent Plan Email</field>
            <field name="model_id" ref="model_sos_fg_plan"/>
            <field name="subject">Indent Plan for {{object.plan_ref_no}}</field>
            <field name="email_from">alert@sosaley.in</field>
         <field name="body_html" type="html">
    <p>Hello,</p>
    <p>The following FG's has been approved for Indent:</p>
    <p>Reference: <t t-out="object.plan_ref_no"/></p>
    <p>Approved By: <t t-out="object.approved_by.name"/></p>
    <table style="border: solid 1px #ccc;background-color: #ece1f5;">
        <thead>
            <tr>
                <th style="border: solid 1px #ccc;">FG Name</th>
                <th style="border: solid 1px #ccc;">Approved Qty</th>
            </tr>
        </thead>
        <tbody>
            <t t-foreach="object.line_ids" t-as="line">
                <tr t-if="line.approved_cnt != 0">
                    <td style="border: solid 1px #ccc;"><t t-out="line.fg_name.name"/></td>
                    <td style="border: solid 1px #ccc;"><t t-out="line.approved_cnt"/></td>
                </tr>
            </t>
        </tbody>
    </table>
</field>

        </record>
    </data>
</odoo>
