From b3f2abec464568515fcdae8a87a5515bc1f241d4 Mon Sep 17 00:00:00 2001 From: Rucha Patel Date: Thu, 22 Mar 2012 15:11:53 +0100 Subject: [PATCH] [FIX] email_template: ensure non-empty context when rendering template' bzr revid: odo@openerp.com-20120322141153-8u3kia3k125et6b5 --- addons/email_template/email_template.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/email_template/email_template.py b/addons/email_template/email_template.py index acd1aed24de..86f136ca5b9 100644 --- a/addons/email_template/email_template.py +++ b/addons/email_template/email_template.py @@ -57,6 +57,8 @@ class email_template(osv.osv): :param int res_id: id of the document record this mail is related to. """ if not template: return u"" + if context is None: + context = {} try: template = tools.ustr(template) record = None