From 2d3f6f94884179610fcf5f25ecbfc617579c8e43 Mon Sep 17 00:00:00 2001 From: "Andrea Grazioso (agr-odoo)" Date: Mon, 8 May 2023 16:13:52 +0000 Subject: [PATCH] [FIX] account: invoice mail subtitle Have an invoice marked as paid Send by email Issue: Email will contain "$ due " which is confusing for the user as the invoice is already paid opw-3289653 closes odoo/odoo#120905 X-original-commit: 5c66a766abed5142d77835dcfda423abdcb1429f Signed-off-by: Brice Bartoletti (bib) Signed-off-by: Grazioso Andrea (agr) --- addons/account/models/account_move.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index a817b0b3f44..eb1e5d55588 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -4229,7 +4229,7 @@ class AccountMove(models.Model): force_email_company=force_email_company, force_email_lang=force_email_lang ) subtitles = [render_context['record'].name] - if self.invoice_date_due: + if self.invoice_date_due and self.payment_state not in ('in_payment', 'paid'): subtitles.append(_('%(amount)s due\N{NO-BREAK SPACE}%(date)s', amount=format_amount(self.env, self.amount_total, self.currency_id, lang_code=render_context.get('lang')), date=format_date(self.env, self.invoice_date_due, date_format='short', lang_code=render_context.get('lang'))