Hi,
Please refer to the code below:
<template id="custom_report_invoice_document"
inherit_id="account.report_invoice_document">
<xpath expr="t[@t-call='web.external_layout']" position="replace">
<t t-call="web.html_container">
<div class="mt-5 clearfix">
<div class="page mb-4">
<h2>
<h1 t-if="o.move_type == 'out_invoice' and o.state == 'posted'"
style="font-size: 40px; text-align: center; margin-bottom:2px; font-weight: bold;">
FACTURA
</h1>
<h1 t-if="o.move_type == 'out_refund' and o.state == 'posted'"
style="font-size: 40px; text-align: center; margin-bottom:2px; font-weight: bold;">
NOTA DE CRÉDITO
</h1>
<h1 t-if="o.move_type == 'out_receipt' and o.state == 'posted'"
style="font-size: 40px; text-align: center; margin-bottom:2px; font-weight: bold;">
NOTA DE DÉBITO
</h1>
</h2>
</div>
</div>
</t>
</xpath>
</template>
Hope it helps.