Hi,
I have to make some customisations to an odoo13 CE instance. (I'm a python developer whith 0 knowledge of Odoo)
Following the Odoo documentation and some blog tutorials, I managed to create a custom module. Everything worked pretty smoothly until I tried to override the invoice report.
I wanted to bring some modifications to account.report_invoice_document, so I created a view which inherit from it. It seems to work but the text (column headers...) appears in english instead of french.
I thought I understood how it works, but obviously I'm missing some point.
The minimal template below, should show "Sous-total" instead of "Subtotal"
Any clue ?
Regards
<odoo>
<data>
<template id="my_custom_report_invoice_document" inherit_id="account.report_invoice_document" priority="999">
<t t-set="o" t-value="o.with_context(lang=lang)" /> <!-- Attempt to solve the problem -->
<xpath expr="//div[@class='page']" position="replace">
<div class="page">
<div class="clearfix">
<div id="total" class="row">
<div t-attf-class="#{'col-4' if report_type != 'html' else 'col-sm-7 col-md-5'} ml-auto">
<table class="table table-sm;page-break-inside: avoid;">
<tr class="border-black o_subtotal" style="">
<td><strong>Subtotal</strong></td>
<td class="text-right">
<span t-field="o.amount_untaxed" />
</td>
</tr>
<t t-foreach="o.amount_by_group" t-as="amount_by_group">
<tr style="">
<t
t-if="len(o.line_ids.filtered(lambda line: line.tax_line_id)) == 1 and o.amount_untaxed == amount_by_group[2]">
<td><span t-esc="amount_by_group[0]" /></td>
<td class="text-right o_price_total">
<span t-esc="amount_by_group[3]" />
</td>
</t>
<t t-else="">
<td>
<span t-esc="amount_by_group[0]" />
<span>&nbsp;<span>on</span>
<t t-esc="amount_by_group[4]" />
</span>
</td>
<td class="text-right o_price_total">
<span t-esc="amount_by_group[3]" />
</td>
</t>
</tr>
</t>
<tr class="border-black o_total">
<td><strong>Total</strong></td>
<td class="text-right">
<span t-field="o.amount_total" />
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</xpath>
</template>
</data>
</odoo>