[FIX] ir.translation: coerce source terms into unicode, to avoid transmitting invalid UTF-8 bytes

This may happen when trying to translate already translated terms, such as the locale-dependen values provided by strftime

lp bug: https://launchpad.net/bugs/610883 fixed

bzr revid: odo@openerp.com-20101230032017-g2r9xx1mu1u5w94g
This commit is contained in:
Olivier Dony 2010-12-30 04:20:17 +01:00
parent 596a464041
commit cb93fbf97b
1 changed files with 1 additions and 1 deletions

View File

@ -158,7 +158,7 @@ class ir_translation(osv.osv):
WHERE lang=%s
AND type in %s
AND src=%s"""
params = (lang or '', types, source)
params = (lang or '', types, tools.ustr(source))
if name:
query += " AND name=%s"
params += (tools.ustr(name),)