[6.0] hr_holidays, holidays report per department, accentuated chars in legends

Bug #832706 reported by Yannick Vaucher @ Camptocamp
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Low
OpenERP Publisher's Warranty Team

Bug Description

Hello,

When generating the xml code for pdf creation it is concatenating a list of string in place of a string for the legend part (date_xml).

xml='''<?xml version="1.0" encoding="UTF-8" ?>
        <report>
        %s
        %s
        %s
        %s
        </report>
        ''' % (header_xml,months_xml,date_xml, ustr(emp_xml))

As a result, accentuated chars are displayed wrongly in ascii. For exemple "é" is displayed "\xe9".

Ex
>>> print "%s %s" % ("1 -> é", [u"2 -> é"],)
1 -> é [u'2 -> \xa9']

Attached is a proposed patch to concatenate the strings of the string list (date_xml) in one string.
Plus, it force strings in unicode to ensure date_xml is not a list of mixed unicode / utf-8 strings.
So the join string method passes.

Best Regards,
Yannick

Tags: maintenance

Related branches

Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :
Changed in openobject-addons:
assignee: nobody → OpenERP Publisher's Warranty Team (openerp-opw)
tags: added: maintenance
Changed in openobject-addons:
importance: Undecided → Low
status: New → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Somesh Khare (somesh.khare) wrote :

Hello Yannick,

Thanks for reporting this issue.

It has been fixed into the lp:~openerp-dev/openobject-addons/6.0-opw-17108-skh branch,

Revision ID: <email address hidden>
Revision Number:4827

Thanks

Changed in openobject-addons:
status: In Progress → Fix Committed
Changed in openobject-addons:
status: Fix Committed → Fix Released
milestone: none → 6.0.4
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.