diff --git a/addons/mail/models/mail_mail.py b/addons/mail/models/mail_mail.py index aa58dbb9240..86d8c8a478d 100644 --- a/addons/mail/models/mail_mail.py +++ b/addons/mail/models/mail_mail.py @@ -434,7 +434,7 @@ class MailMail(models.Model): # To avoid sending twice the same email, provoke the failure earlier mail.write({ 'state': 'exception', - 'failure_reason': _('Error without exception. Probably due do sending an email without computed recipients.'), + 'failure_reason': _('Error without exception. Probably due to sending an email without computed recipients.'), }) # Update notification in a transient exception state to avoid concurrent # update in case an email bounces while sending all emails related to current @@ -445,7 +445,7 @@ class MailMail(models.Model): ('notification_status', 'not in', ('sent', 'canceled')) ]) if notifs: - notif_msg = _('Error without exception. Probably due do concurrent access update of notification records. Please see with an administrator.') + notif_msg = _('Error without exception. Probably due to concurrent access update of notification records. Please see with an administrator.') notifs.sudo().write({ 'notification_status': 'exception', 'failure_type': 'unknown', diff --git a/addons/test_mail/tests/test_mail_mail.py b/addons/test_mail/tests/test_mail_mail.py index 347ea413a8a..a23b0f22e74 100644 --- a/addons/test_mail/tests/test_mail_mail.py +++ b/addons/test_mail/tests/test_mail_mail.py @@ -244,7 +244,7 @@ class TestMailMail(TestMailCommon): mail.write({'email_to': email_to}) with self.mock_mail_gateway(): mail.send(raise_exception=False) - self.assertIn('Error without exception. Probably due do sending an email without computed recipients.', mail.failure_reason) + self.assertIn('Error without exception. Probably due to sending an email without computed recipients.', mail.failure_reason) self.assertFalse(mail.failure_type, 'Mail: missing email_to: no failure type, should be updated') self.assertEqual(mail.state, 'exception') if email_to == ' ': @@ -261,7 +261,7 @@ class TestMailMail(TestMailCommon): mail.write({'email_to': email_to}) with self.mock_mail_gateway(): mail.send(raise_exception=False) - self.assertIn('Error without exception. Probably due do sending an email without computed recipients.', mail.failure_reason) + self.assertIn('Error without exception. Probably due to sending an email without computed recipients.', mail.failure_reason) self.assertFalse(mail.failure_type, 'Mail: invalid email_to: no failure type, should be updated') self.assertEqual(mail.state, 'exception') self.assertEqual(notification.failure_type, failure_type, 'Mail: invalid email_to: missing instead of invalid') @@ -322,7 +322,7 @@ class TestMailMail(TestMailCommon): notification.write({'res_partner_id': partner.id}) with self.mock_mail_gateway(): mail.send(raise_exception=False) - self.assertEqual(mail.failure_reason, 'Error without exception. Probably due do sending an email without computed recipients.') + self.assertEqual(mail.failure_reason, 'Error without exception. Probably due to sending an email without computed recipients.') self.assertFalse(mail.failure_type, 'Mail: void recipient partner: no failure type, should be updated') self.assertEqual(mail.state, 'exception') self.assertEqual(notification.failure_type, 'mail_email_invalid', 'Mail: void recipient partner: should be missing, not invalid') @@ -335,7 +335,7 @@ class TestMailMail(TestMailCommon): notification.write({'res_partner_id': partner.id}) with self.mock_mail_gateway(): mail.send(raise_exception=False) - self.assertEqual(mail.failure_reason, 'Error without exception. Probably due do sending an email without computed recipients.') + self.assertEqual(mail.failure_reason, 'Error without exception. Probably due to sending an email without computed recipients.') self.assertFalse(mail.failure_type, 'Mail: invalid recipient partner: no failure type, should be updated') self.assertEqual(mail.state, 'exception') self.assertEqual(notification.failure_type, 'mail_email_invalid')