diff --git a/addons/account/i18n/account.pot b/addons/account/i18n/account.pot index b643538e177..1ac13e2907a 100644 --- a/addons/account/i18n/account.pot +++ b/addons/account/i18n/account.pot @@ -307,6 +307,15 @@ msgstr "" msgid "45 Days" msgstr "" +#. module: account +#. odoo-python +#: code:addons/account/models/account_payment_term.py:0 +#, python-format +msgid "" +"%(count)s# Installment of %(amount)s due on %(date)s" +msgstr "" + #. module: account #: model_terms:ir.ui.view,arch_db:account.view_account_payment_register_form msgid "Early Payment Discount applied." @@ -5613,6 +5622,14 @@ msgstr "" msgid "Early Payment Discount granted for this line" msgstr "" +#. module: account +#. odoo-python +#: code:addons/account/models/account_payment_term.py:0 +#, python-format +msgid "" +"Early Payment Discount: %(amount)s if paid before %(date)s" +msgstr "" + #. module: account #: model_terms:ir.ui.view,arch_db:account.view_move_line_tree msgid "Edit" diff --git a/addons/account/models/account_payment_term.py b/addons/account/models/account_payment_term.py index e4ea2a3117c..b1a543e3d68 100644 --- a/addons/account/models/account_payment_term.py +++ b/addons/account/models/account_payment_term.py @@ -85,9 +85,11 @@ class AccountPaymentTerm(models.Model): if record.early_discount: date = record._get_last_discount_date_formatted(record.example_date) discount_amount = record._get_amount_due_after_discount(record.example_amount, 0.0) - record.example_preview_discount = f""" - Early Payment Discount: {formatLang(self.env, discount_amount, monetary=True, currency_obj=currency)} if paid before {date} - """ + record.example_preview_discount = _( + "Early Payment Discount: %(amount)s if paid before %(date)s", + amount=formatLang(self.env, discount_amount, monetary=True, currency_obj=currency), + date=date, + ) if not record.example_invalid: terms = record._compute_terms( @@ -102,14 +104,13 @@ class AccountPaymentTerm(models.Model): for i, info_by_dates in enumerate(record._get_amount_by_date(terms).values()): date = info_by_dates['date'] amount = info_by_dates['amount'] - example_preview += f""" -
- {i+1}# - Installment of - {formatLang(self.env, amount, monetary=True, currency_obj=currency)} - due on - {date} - """ + example_preview += "
" + example_preview += _( + "%(count)s# Installment of %(amount)s due on %(date)s", + count=i+1, + amount=formatLang(self.env, amount, monetary=True, currency_obj=currency), + date=date, + ) example_preview += "
" record.example_preview = example_preview