<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data noupdate="1">
        <record id="account.email_template_edi_invoice" model="mail.template">
            <field name="body_html" type="html">
<div style="margin: 0px; padding: 0px;">
    <p style="margin: 0px; padding: 0px; font-size: 13px;">
        Dear ${object.partner_id.name}
        % if object.partner_id.parent_id:
            (${object.partner_id.parent_id.name})
        % endif
        <br /><br />
        Here is, in attachment, your 
        % if object.number:
            invoice <strong>${object.number}</strong>
        % else:
            invoice
        %endif
        % if object.origin:
            (with reference: ${object.origin} )
        % endif
        amounting in <strong>${format_amount(object.amount_total, object.currency_id)}</strong>
        from ${object.company_id.name}.
        % if object.state=='paid':
            This invoice is already paid.
        % else:
            Please remit payment at your earliest convenience.
            % if object.reference_type == 'bba' and object.reference:
            Please use the following communication for your payment: <strong>${object.reference}</strong>.
        % endif
        <br /><br />
        Do not hesitate to contact us if you have any question.
    </p>
</div>
            </field>
        </record>
    </data>
</odoo>
