From 04db2309aba38325b1dad0db3a0f19829fd8b1cd Mon Sep 17 00:00:00 2001 From: yhu-odoo Date: Tue, 23 Mar 2021 09:31:26 +0000 Subject: [FIX] purchase: message not translated Some message are not translated. Fix them. closes odoo/odoo#68223 Signed-off-by: Arnold Moyaux --- addons/purchase/i18n/purchase.pot | 12 ++++++++++++ addons/purchase/models/purchase.py | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/addons/purchase/i18n/purchase.pot b/addons/purchase/i18n/purchase.pot index b82178f1c82..3cee21a06fa 100644 --- a/addons/purchase/i18n/purchase.pot +++ b/addons/purchase/i18n/purchase.pot @@ -41,6 +41,12 @@ msgstr "" msgid "${object.company_id.name} Order (Ref ${object.name or 'n/a' })" msgstr "" +#. module: purchase +#: code:addons/purchase/models/purchase.py:0 +#, python-format +msgid "%(name)s confirmed the receipt will take place on %(date)s." +msgstr "" + #. module: purchase #: model_terms:ir.ui.view,arch_db:purchase.mail_notification_confirm msgid " " @@ -2440,6 +2446,12 @@ msgstr "" msgid "Terms and Conditions" msgstr "" +#. module: purchase +#: code:addons/purchase/models/purchase.py:0 +#, python-format +msgid "The order receipt has been acknowledged by %(name)s." +msgstr "" + #. module: purchase #: model_terms:ir.actions.act_window,help:purchase.act_res_partner_2_purchase_order msgid "" diff --git a/addons/purchase/models/purchase.py b/addons/purchase/models/purchase.py index 56793330d20..69695e37e2c 100644 --- a/addons/purchase/models/purchase.py +++ b/addons/purchase/models/purchase.py @@ -709,7 +709,7 @@ class PurchaseOrder(models.Model): if order.state in ['purchase', 'done'] and not order.mail_reminder_confirmed: order.mail_reminder_confirmed = True date = confirmed_date or self.date_planned.date() - order.message_post(body="%s confirmed the receipt will take place on %s." % (order.partner_id.name, date)) + order.message_post(body=_("%(name)s confirmed the receipt will take place on %(date)s.", name=order.partner_id.name, date=date)) def _approval_allowed(self): """Returns whether the order qualifies to be approved by the current user""" @@ -726,7 +726,7 @@ class PurchaseOrder(models.Model): for order in self: if order.state in ['purchase', 'done'] and not order.mail_reception_confirmed: order.mail_reception_confirmed = True - order.message_post(body="The order receipt has been acknowledged by %s." % order.partner_id.name) + order.message_post(body=_("The order receipt has been acknowledged by %(name)s.", name=order.partner_id.name)) def _update_date_planned_for_lines(self, updated_dates): # create or update the activity -- cgit v1.2.3