[FIX] calendar: correctly render template
Currently template rendering in calendar returns a tuple instead of real
results. This is a followup of 7159f657a0 and probably linked to cleaning
done in template while working on new calendar.
This commit makes calendar correctly use the rendering API.
Spotted when working on task ID 2238597
This commit is contained in:
@@ -124,15 +124,15 @@ class Attendee(models.Model):
|
||||
'mimetype': 'text/calendar',
|
||||
'datas': base64.b64encode(ics_file)})
|
||||
]
|
||||
body = self.env['mail.template'].with_context(rendering_context)._render_template(
|
||||
invitation_template.body_html,
|
||||
self._name,
|
||||
attendee.ids)
|
||||
# TODO check lang
|
||||
subject = self.env['mail.template']._render_template(
|
||||
invitation_template.subject,
|
||||
self._name,
|
||||
attendee.ids)
|
||||
body = invitation_template.with_context(rendering_context)._render_field(
|
||||
'body_html',
|
||||
attendee.ids,
|
||||
compute_lang=True,
|
||||
post_process=True)[attendee.id]
|
||||
subject = invitation_template._render_field(
|
||||
'subject',
|
||||
attendee.ids,
|
||||
compute_lang=True)[attendee.id]
|
||||
attendee.event_id.with_context(no_document=True).message_notify(
|
||||
body=body,
|
||||
subject=subject,
|
||||
|
||||
Reference in New Issue
Block a user