Merge lp:~openerp-dev/openobject-addons/7.0-opw-604328-ado into lp:openobject-addons/7.0
Proposed by
Amit Dodiya (OpenERP)
Status: | Needs review |
---|---|
Proposed branch: | lp:~openerp-dev/openobject-addons/7.0-opw-604328-ado |
Merge into: | lp:openobject-addons/7.0 |
Diff against target: |
20 lines (+2/-2) 1 file modified
hr_holidays/report/holidays_summary_report.py (+2/-2) |
To merge this branch: | bzr merge lp:~openerp-dev/openobject-addons/7.0-opw-604328-ado |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Amit Dodiya (OpenERP) (community) | Needs Resubmitting | ||
Naresh(OpenERP) (community) | Needs Fixing | ||
Review via email: mp+207865@code.launchpad.net |
Description of the change
Hello,
[FIX] unicode error holidays report: while we have spanish localisaion set for our operating system and we run the yml tests for hr_holidays it gives the unicode error of date time format
Steps:
1). Set spanish localization in your operating system
2). now run the yml tests for hr_holidays module
It will give you UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 24: ordinal not in range(12)
Regards,
Amit
To post a comment you must log in.
Unmerged revisions
- 9854. By Amit Dodiya (OpenERP)
-
[FIX] unicode error holidays report: while we have spanish localisaion set for our operating system and we run the yml tests for hr_holidays it gives the unicode error of date time format
Hello Amit,
The fix is a bit incomplete as the names of month, employee too will have the same fix. Also instead of converting each value every where we can just finally convert each list. Something like this:
@@ -234,7 +234,7 @@
emp_xml += emp_create_ xml(self, cr, uid, 0, holiday_type, row_id, item['id'], item['name'], som, eom)
row_id = row_id +1
- header_xml = '''
<date> %s</date>
<company> %s</company> xml,months_ xml,date_ xml, ustr(emp_xml))
+ header_xml = u'''
<header>
@@ -249,7 +249,10 @@
%s
%s
</report>
- ''' % (header_
+ ''' % (header_xml,
+ u''.join((ustr(m) for m in months_xml)),
+ u''.join((ustr(d) for d in date_xml)),
+ u''.join((ustr(e) for e in emp_xml)))
return xml
Thanks,