[FIX] email_template: ensure non-empty context when rendering template'

bzr revid: odo@openerp.com-20120322141153-8u3kia3k125et6b5
This commit is contained in:
Rucha Patel 2012-03-22 15:11:53 +01:00 committed by Olivier Dony
parent cbef5ce396
commit b3f2abec46
1 changed files with 2 additions and 0 deletions

View File

@ -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