From f9b1161ea7da48690208825d7cfaf3383e7b7f9b Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Mon, 26 Jan 2015 18:53:09 +0100 Subject: [PATCH] [FIX] sales_team: ensure encoding using ustr for bar values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- addons/sales_team/sales_team.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sales_team/sales_team.py b/addons/sales_team/sales_team.py index e18cc3213e1..a101a25519d 100644 --- a/addons/sales_team/sales_team.py +++ b/addons/sales_team/sales_team.py @@ -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