Skip to content

Commit

Permalink
Merge PR #1190 into 17.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Feb 1, 2025
2 parents 41992c7 + 47e8881 commit 82776c2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
7 changes: 7 additions & 0 deletions contract/i18n/contract.pot
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 7 additions & 0 deletions contract/i18n/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
12 changes: 7 additions & 5 deletions contract/models/contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,11 +613,13 @@ def _invoice_followers(self, invoices):
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)
Expand Down

0 comments on commit 82776c2

Please sign in to comment.