From aabd4296c5988b5d3901c00c5f77cbce29acc8ca Mon Sep 17 00:00:00 2001 From: root Date: Mon, 8 Feb 2021 07:03:53 +0000 Subject: [PATCH] [I18N] account: add missing translations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this commit not all messages where translated/translatable. By adding _() to them they're now translatable. This means that if somebody puts OdooBot to another language the messages would be translated. closes odoo/odoo#65787 X-original-commit: 355ae0d59a446a87d195b6749e66cd732f21ae2f Signed-off-by: William André (wan) --- addons/account/i18n/account.pot | 15 +++++++++++++++ addons/account/models/account_move.py | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/addons/account/i18n/account.pot b/addons/account/i18n/account.pot index d02a6876c61..62e56ce45e0 100644 --- a/addons/account/i18n/account.pot +++ b/addons/account/i18n/account.pot @@ -8030,6 +8030,7 @@ msgstr "" #. module: account #: code:addons/account/models/account_move.py:0 #: code:addons/account/models/account_move.py:0 +#: code:addons/account/models/ir_actions_report.py:0 #, python-format msgid "Only invoices could be printed." msgstr "" @@ -11842,6 +11843,19 @@ msgstr "" msgid "The holder of a journal's bank account must be the company (%s)." msgstr "" +#. module: account +#: code:addons/account/models/account_move.py:0 +#, python-format +msgid "" +"The invoice already contains lines, it was not updated from the attachment." +msgstr "" + +#. module: account +#: code:addons/account/models/account_move.py:0 +#, python-format +msgid "The invoice is not a draft, it was not updated from the attachment." +msgstr "" + #. module: account #: code:addons/account/models/account_bank_statement.py:0 #, python-format @@ -13862,6 +13876,7 @@ msgstr "" #. module: account #: code:addons/account/models/account_move.py:0 #: code:addons/account/wizard/account_automatic_entry_wizard.py:0 +#: code:addons/account/wizard/account_automatic_entry_wizard.py:0 #, python-format msgid "[Not set]" msgstr "" diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index 7d121a5d8f0..eaa0ff269e2 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -2900,13 +2900,13 @@ class AccountMove(models.Model): attachments = self.env['ir.attachment'].browse(attachment_ids) odoobot = self.env.ref('base.partner_root') if attachments and self.state != 'draft': - self.message_post(body='The invoice is not a draft, it was not updated from the attachment.', + self.message_post(body=_('The invoice is not a draft, it was not updated from the attachment.'), message_type='comment', subtype_xmlid='mail.mt_note', author_id=odoobot.id) return res if attachments and self.line_ids: - self.message_post(body='The invoice already contains lines, it was not updated from the attachment.', + self.message_post(body=_('The invoice already contains lines, it was not updated from the attachment.'), message_type='comment', subtype_xmlid='mail.mt_note', author_id=odoobot.id)