[FIX] sales_team: ensure encoding using ustr for bar values

On Windows, when having special characters in the month name (For instance, 'décembre'),
the windows odoo server sent non utf8 encoded, which could not be decoded by json dumps

opw-622189
This commit is contained in:
Denis Ledoux 2015-01-26 18:53:09 +01:00
parent ae9341fa22
commit f9b1161ea7
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ class crm_case_section(osv.osv):
month_begin = date.today().replace(day=1)
section_result = [{
'value': 0,
'tooltip': (month_begin + relativedelta.relativedelta(months=-i)).strftime('%B %Y'),
'tooltip': tools.ustr((month_begin + relativedelta.relativedelta(months=-i)).strftime('%B %Y')),
} for i in range(self._period_number - 1, -1, -1)]
group_obj = obj.read_group(cr, uid, domain, read_fields, groupby_field, context=context)
pattern = tools.DEFAULT_SERVER_DATE_FORMAT if obj.fields_get(cr, uid, groupby_field)[groupby_field]['type'] == 'date' else tools.DEFAULT_SERVER_DATETIME_FORMAT