[RC1] non-ascii characters is not printed in pychart pdf report example : Future stock forecast.

Bug #684592 reported by vrsb
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Confirmed
Wishlist
OpenERP's Framework R&D

Bug Description

Hello. When i select some product with cyrillic symbols inside its name and click "Future stock forecast" report, i get:

(<type 'exceptions.UnicodeDecodeError'>, UnicodeDecodeError('ascii', ' [MB2] Mainboard \xd0\xb2\xd1\x8b\xd0\xb0ASUStek A7V8X-X', 17, 18, 'ordinal not in range(128)'), <traceback object at 0x02AAF4B8>)

summary: - [RC1] Future stock forecast, non-ascii characters
+ [RC1] non-ascii characters is not printed in pychart pdf report example
+ : Future stock forecast.
affects: openobject-addons → openobject-server
Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
vrsb (shipilov555) wrote :

The same thing happens with custom reports like "Daily sales turnover over one year" of report_sale module, if you translate the name of the report as non-ascii string.

Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

I set as wishlist as I think these reports must be rewriten completly for v6.1

Changed in openobject-server:
importance: Low → Wishlist
Revision history for this message
Cristian Salamea (ovnicraft) wrote :

@Fabien but it let them unusable by now with that coding

Revision history for this message
Tobias G. Pfeiffer (tgpfeiffer) wrote :

This is not only true for cyrillic letters, but also for (I guess) anything non-ascii, like German umlauts -- also in 6.1. The critical point is:

    File "/usr/lib/pymodules/python2.6/pychart/font.py", line 374, in unaligned_get_dimension
      for line in unicode(text).split('\n'):
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 18: ordinal not in range(128)

I know that encodings are always a hassle, but I guess adding ".decode('utf-8')" somewhere in that line should help?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.