diff --git a/addons/mail/models/mail_render_mixin.py b/addons/mail/models/mail_render_mixin.py index 3b650ba38684a9293317ac190250eddafa413877..4b583ed8959f372da659655a08fa15a4a8feae94 100644 --- a/addons/mail/models/mail_render_mixin.py +++ b/addons/mail/models/mail_render_mixin.py @@ -5,6 +5,7 @@ import babel import copy import logging import re +import traceback from lxml import html from markupsafe import Markup @@ -313,7 +314,7 @@ class MailRenderMixin(models.AbstractModel): group = self.env.ref('mail.group_mail_template_editor') raise AccessError(_('Only users belonging to the "%s" group can modify dynamic templates.', group.name)) from e _logger.info("Failed to render template : %s", template_src, exc_info=True) - raise UserError(_("Failed to render QWeb template : %s)", template_src)) from e + raise UserError(_("Failed to render QWeb template : %s\n\n%s)", template_src, traceback.format_exc())) from e results[record.id] = render_result return results diff --git a/addons/mail/wizard/mail_template_preview_views.xml b/addons/mail/wizard/mail_template_preview_views.xml index 228c97956f5f31de17d1bbc2efba09d87840319d..3cc017101e59b2141cffb3bcdffe05196108a9c4 100644 --- a/addons/mail/wizard/mail_template_preview_views.xml +++ b/addons/mail/wizard/mail_template_preview_views.xml @@ -8,7 +8,7 @@ <form string="Email Preview"> <h3>Preview of <field name="mail_template_id" readonly="1" nolabel="1" options="{'no_open' : True}"/></h3> <div class="alert alert-danger" role="alert" attrs="{'invisible' : [('error_msg', '=', False)]}"> - <field name="error_msg" /> + <field name="error_msg" widget="text"/> </div> <field name="no_record" invisible="1"/> <div class="container">