Skip to content
Snippets Groups Projects
Commit 2d632013 authored by anhe-odoo's avatar anhe-odoo
Browse files

[FIX] accounting: fix invoices preview total and untaxed amounts


Expected Behavior

The total amount and total taxes amount in invoice, purchase order and offer should be formated with the correct formating options (related to the client's location), and with the correct currency symbol, as it was the case in V14

Observed behaviour

In V15, these amount are written as pure numerical values (eg : 1452.24 instead of $1.452,24). This is the case in every generated pdf, as well as in the user portal preview(s), but not in classical form view(s).

Reproducibility

This bug can be reproduced following these steps:
- Create a new invoice
- Validate it
- Preview it in the user portal of download the printable .pdf
This can also be done with a purchase order, following the same steps.

Problem Rout Cause

The problem comes from the fact we read the wrong fields, using account.tax_totals.amount_total and account.tax_totals[subtotals].amount instead of account.tax_totals.formatted_amount_total and account.tax_totals[subtotals].formatted_amount.

opw-2666924
opw-2666553
opw-2665130

closes odoo/odoo#78372

Signed-off-by: default avatarQuentin De Paoli (qdp) <qdp@openerp.com>
parent 0886c10d
Branches
Tags
No related merge requests found
......@@ -198,7 +198,7 @@
<td class="text-right">
<span
t-att-class="oe_subtotal_footer_separator"
t-esc="subtotal['amount']"
t-esc="subtotal['formatted_amount']"
/>
</td>
</tr>
......@@ -211,7 +211,7 @@
<tr class="border-black o_total">
<td><strong>Total</strong></td>
<td class="text-right">
<span t-esc="tax_totals['amount_total']"/>
<span t-esc="tax_totals['formatted_amount_total']"/>
</td>
</tr>
</template>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment