From bcc08ee4227048e05089bac2d5b8e1d5539db82c Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Fri, 19 Sep 2014 11:06:17 +0200 Subject: [PATCH] [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. --- addons/event/event.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/event/event.py b/addons/event/event.py index 2b2f937..937884f 100644 --- a/addons/event/event.py +++ b/addons/event/event.py @@ -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): -- 1.7.10.4