diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index e01033cbabb..3a803dba0f5 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -1168,6 +1168,10 @@ class AccountMove(models.Model): handle_price_include=False, )) move.tax_totals = self.env['account.tax']._prepare_tax_totals(**kwargs) + rounding_line = move.line_ids.filtered(lambda l: l.display_type == 'rounding') + if rounding_line: + amount_total_rounded = move.tax_totals['amount_total'] - rounding_line.balance + move.tax_totals['formatted_amount_total_rounded'] = formatLang(self.env, amount_total_rounded, currency_obj=move.currency_id) or '' else: # Non-invoice moves don't support that field (because of multicurrency: all lines of the invoice share the same currency) move.tax_totals = None diff --git a/addons/account/static/src/components/tax_totals/tax_totals.xml b/addons/account/static/src/components/tax_totals/tax_totals.xml index 841fff0258e..be1ab967dcc 100644 --- a/addons/account/static/src/components/tax_totals/tax_totals.xml +++ b/addons/account/static/src/components/tax_totals/tax_totals.xml @@ -75,6 +75,18 @@ name="amount_total" t-att-class="Object.keys(totals.groups_by_subtotal).length > 0 ? 'oe_subtotal_footer_separator' : ''" t-out="totals.formatted_amount_total" + t-attf-style="{{ !totals.formatted_amount_total_rounded ? 'font-size: 1.3em; font-weight: bold; white-space: nowrap;' : 'font-size: 1em;' }}" + /> + + + + + + + + + diff --git a/addons/account/views/report_invoice.xml b/addons/account/views/report_invoice.xml index 3d0357e01a8..91e0a1371af 100644 --- a/addons/account/views/report_invoice.xml +++ b/addons/account/views/report_invoice.xml @@ -282,13 +282,21 @@ + - Total + Total + Total + + Total Rounded + + + +