diff --git a/addons/mass_mailing_sms/wizard/mailing_sms_test.py b/addons/mass_mailing_sms/wizard/mailing_sms_test.py index 44dad036712..7ba96ffbf5b 100644 --- a/addons/mass_mailing_sms/wizard/mailing_sms_test.py +++ b/addons/mass_mailing_sms/wizard/mailing_sms_test.py @@ -54,14 +54,15 @@ class MassSMSTest(models.TransientModel): _('Test SMS successfully sent to %s', sent_sms.get('res_id'))) elif sent_sms.get('state'): notification_messages.append( - _('Test SMS could not be sent to %s:
%s', + _('Test SMS could not be sent to %s: %s', sent_sms.get('res_id'), error_messages.get(sent_sms['state'], _("An error occurred."))) ) if notification_messages: - self.mailing_id._message_log(body=Markup('') % ''.join( - [Markup('
  • %s
  • ') % notification_message for notification_message in notification_messages] - )) + message_body = Markup( + f"" + ) % tuple(notification_messages) + self.mailing_id._message_log(body=message_body) return True