[FIX] mail, survey, website_slides: fix logger usage
Make CI/Style happy even if not really related to this PR. Task-2621326 (Mail: add 'view' button in 'light notification template') Part-of: odoo/odoo#76418
This commit is contained in:
@@ -271,7 +271,11 @@ class MailTemplate(models.Model):
|
||||
try:
|
||||
template = self.env.ref(email_layout_xmlid, raise_if_not_found=True)
|
||||
except ValueError:
|
||||
_logger.warning('QWeb template %s not found when sending template %s. Sending without layouting.' % (email_layout_xmlid, self.name))
|
||||
_logger.warning(
|
||||
'QWeb template %s not found when sending template %s. Sending without layout.',
|
||||
email_layout_xmlid,
|
||||
self.name
|
||||
)
|
||||
else:
|
||||
record = self.env[self.model].browse(res_id)
|
||||
model = self.env['ir.model']._get(record._name)
|
||||
|
||||
@@ -218,7 +218,7 @@ class SurveyInvite(models.TransientModel):
|
||||
try:
|
||||
template = self.env.ref(email_layout_xmlid, raise_if_not_found=True)
|
||||
except ValueError:
|
||||
_logger.warning('QWeb template %s not found when sending survey mails. Sending without layouting.' % (email_layout_xmlid))
|
||||
_logger.warning('QWeb template %s not found when sending survey mails. Sending without layout', email_layout_xmlid)
|
||||
else:
|
||||
template_ctx = {
|
||||
'message': self.env['mail.message'].sudo().new(dict(body=mail_values['body_html'], record_name=self.survey_id.title)),
|
||||
|
||||
@@ -97,7 +97,7 @@ class SlideChannelInvite(models.TransientModel):
|
||||
try:
|
||||
template = self.env.ref(email_layout_xmlid, raise_if_not_found=True)
|
||||
except ValueError:
|
||||
_logger.warning('QWeb template %s not found when sending slide channel mails. Sending without layouting.' % (email_layout_xmlid))
|
||||
_logger.warning('QWeb template %s not found when sending slide channel mails. Sending without layout.', email_layout_xmlid)
|
||||
else:
|
||||
# could be great to use _notify_prepare_template_context someday
|
||||
template_ctx = {
|
||||
|
||||
Reference in New Issue
Block a user