Skip to content
Snippets Groups Projects
Commit bcc08ee4 authored by Martin Trigaux's avatar Martin Trigaux
Browse files

[FIX] event: translate templates into user language

When sending an email of the registration/confirmation, the context was lost and the tempate sticked in en_US.
With the patch, the template will use the current user's language.
parent a218a9ed
No related branches found
No related tags found
No related merge requests found
......@@ -370,7 +370,7 @@ class event_registration(osv.osv):
else:
template_id = registration.event_id.email_registration_id.id
if template_id:
mail_message = self.pool.get('email.template').send_mail(cr,uid,template_id,registration.id)
self.pool.get('email.template').send_mail(cr,uid,template_id,registration.id, context=context)
return True
def mail_user_confirm(self, cr, uid, ids, context=None):
......@@ -380,7 +380,7 @@ class event_registration(osv.osv):
for registration in self.browse(cr, uid, ids, context=context):
template_id = registration.event_id.email_confirmation_id.id
if template_id:
mail_message = self.pool.get('email.template').send_mail(cr,uid,template_id,registration.id)
self.pool.get('email.template').send_mail(cr,uid,template_id,registration.id, context=context)
return True
def onchange_contact_id(self, cr, uid, ids, contact, partner, context=None):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment