diff --git a/contract/i18n/contract.pot b/contract/i18n/contract.pot index e0d30dfe7..e0b87d5e5 100644 --- a/contract/i18n/contract.pot +++ b/contract/i18n/contract.pot @@ -2334,6 +2334,13 @@ msgstr "" msgid "You must supply a date of next invoice for contract line '%s'" msgstr "" +#. module: contract +#. odoo-python +#: code:addons/contract/models/contract.py:0 +#, python-format +msgid "by contract" +msgstr "" + #. module: contract #: model_terms:ir.ui.view,arch_db:contract.contract_contract_form_view msgid "e.g. Contract XYZ" diff --git a/contract/i18n/es.po b/contract/i18n/es.po index 04684e3dd..787e7db42 100644 --- a/contract/i18n/es.po +++ b/contract/i18n/es.po @@ -2542,6 +2542,13 @@ msgstr "" "Debe proporcionar la fecha de la próxima factura para la línea del contrato " "'%s'" +#. module: contract +#. odoo-python +#: code:addons/contract/models/contract.py:0 +#, python-format +msgid "by contract" +msgstr "por el contrato" + #. module: contract #: model_terms:ir.ui.view,arch_db:contract.contract_contract_form_view msgid "e.g. Contract XYZ" diff --git a/contract/models/contract.py b/contract/models/contract.py index 1ad85e4c6..1315b85ac 100644 --- a/contract/models/contract.py +++ b/contract/models/contract.py @@ -613,11 +613,13 @@ class ContractContract(models.Model): def _add_contract_origin(self, invoices): for item in self: for move in invoices & item._get_related_invoices(): - body = Markup(_("%(msg)s by contract: %(contract_link)s")) % { - "msg": move._creation_message(), - "contract_link": item._get_html_link(title=item.display_name), - } - move.message_post(body=body) + translation = _("by contract") + move.message_post( + body=Markup( + f"{move._creation_message()} {translation} " + f"{item._get_html_link(title=item.display_name)}." + ) + ) def _recurring_create_invoice(self, date_ref=False): invoices_values = self._prepare_recurring_invoices_values(date_ref)