Merge lp:~openerp-dev/openobject-addons/6.1-opw-575435-skh into lp:openobject-addons/6.1

Proposed by Somesh Khare
Status: Approved
Approved by: Naresh(OpenERP)
Approved revision: 6834
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-575435-skh
Merge into: lp:openobject-addons/6.1
Diff against target: 21 lines (+2/-2)
1 file modified
stock/report/stock_graph.py (+2/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-575435-skh
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Approve
Review via email: mp+109082@code.launchpad.net

Description of the change

Hello Sir,

[FIX] UnicodeDecodeError: Unicode error occurred when have accented character in the product name

Steps to reproduce:
1. Create a product with the name "Álcool reference" and reference "Álcool".
2. Try to print the "Stock Lebel forecast" Report.

It raised the UnicodeDecodeError.

This branch fixes this issue. Kindly review the branch and please share your views on it.

Thanks,
Somesh Khare

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) :
review: Approve
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello,

This bug is not reproducible on Trunk so if this Merge Proposal could not be merged in v6.1 at the release of v7.0, it will be closed.

Thanks,
Naresh Soni

Unmerged revisions

6834. By Somesh Khare

[FIX] UnicodeDecodeError: Unicode error occurred when have accented character in the product name (Case: ref 575435)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'stock/report/stock_graph.py'
2--- stock/report/stock_graph.py 2011-01-14 00:11:01 +0000
3+++ stock/report/stock_graph.py 2012-06-07 07:35:29 +0000
4@@ -22,7 +22,7 @@
5 import pychart.legend
6 import time
7 from report.misc import choice_colors
8-
9+from openerp.tools.misc import ustr
10 #
11 # Draw a graph for stocks
12 #
13@@ -87,7 +87,7 @@
14 st.width = 1
15 st.cap_style=1
16 st.join_style=1
17- plot = line_plot.T(label=self._names[product_id], data=datas2, line_style=st)
18+ plot = line_plot.T(label=ustr(self._names[product_id]), data=datas2, line_style=st)
19 plots.append(plot)
20
21 interval = max((val_max-val_min)/15, 86400)