[FIX] Improved code to encode accented char.

bzr revid: tpa@tinyerp.com-20120823094111-vph3jpaxb29hoqqm
This commit is contained in:
Turkesh Patel (Open ERP)
2012-08-23 15:11:11 +05:30
parent 2bebc58b90
commit e7a5fcd896
+2 -2
View File
@@ -22,7 +22,7 @@ from pychart import *
import pychart.legend
import time
from report.misc import choice_colors
import base64
import tools
#
# Draw a graph for stocks
@@ -42,7 +42,7 @@ class stock_graph(object):
product_name=product_name.replace('/', '//')
if product_id not in self._datas:
self._datas[product_id] = {}
self._names[product_id] = product_name.decode('utf-8')
self._names[product_id] = tools.ustr(product_name)
for (dt,stock) in datas:
if not dt in self._datas[product_id]:
self._datas[product_id][dt]=0