Odoo Help


Odoo warning - Failed to render template

on 10/31/17, 4:25 AM 340 views

Hello guys, I created a email template for hr_holidays in Odoo 9 but when I try send the email I get the following error:

Failed to render template <Template memory:7fa694cc5550> using values {'format_tz': <function <lambda> at 0x7fa6992b82a8>, 'ctx': {}, 'user': res.users(7,), 'object': None}

I don't know what's happening , I can't recognize that error, this is my "send email" code:

                mail_ids = []

                mail_pool = self.pool['mail.mail']

                data_pool = self.pool['ir.model.data']

                local_context = context.copy()

                template_xmlid = 'holidays_email_template_a_manager_aprobar'

                template_pool = self.pool('mail.template')

                dummy, template_id = data_pool.get_object_reference(cr, uid, 'hr_holidays', template_xmlid)

                for attendee in self.browse(cr, uid, ids, context=context):

                    manager = attendee.department_id.manager_id.user_id.partner_id.email

                    mail_id = template_pool.send_mail(cr, uid, template_id, manager, context=local_context)


                mail_pool.send(cr, uid, mail_ids, context=context)

Could anyone help me? Thank You so much !

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 10/31/17, 4:25 AM
Seen: 340 times
Last updated: 10/31/17, 5:03 AM