[FIX] account: invoice mail subtitle
Have an invoice marked as paid Send by email Issue: Email will contain "$ <amount> due <due date>" 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) <bib@odoo.com> Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
This commit is contained in:
@@ -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'))
|
||||
|
||||
Reference in New Issue
Block a user