← Back to team overview

openerp-dev-web team mailing list archive

[Merge] lp:~openerp-commiter/openobject-addons/trunk-dev-addons3-mtr1 into lp:~openerp-dev/openobject-addons/trunk-dev-addons3

 

Meera Trambadia (OpenERP) has proposed merging lp:~openerp-commiter/openobject-addons/trunk-dev-addons3-mtr1 into lp:~openerp-dev/openobject-addons/trunk-dev-addons3.

Requested reviews:
  OpenERP R&D Team (openerp-dev)
Related bugs:
  #600547 Invoice totals not updated when a line is moved (store={...} bug?)
  https://bugs.launchpad.net/bugs/600547
  #690895 copy account.move crash 
  https://bugs.launchpad.net/bugs/690895
  #694144 [6.0] sales manager dashboard - sales by month - sql query error, usabiliy
  https://bugs.launchpad.net/bugs/694144
  #695632 [RC1]Two same fields creating problem in web-client
  https://bugs.launchpad.net/bugs/695632
  #695960 [6.0RC1][hr_timesheet]Problems printing timesheet reports
  https://bugs.launchpad.net/bugs/695960

For more details, see:
https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-dev-addons3-mtr1/+merge/46118

[FIX] hr_timesheet:It now print reports having employee name/surname with accents" --fixes lp:695960
-- 
https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-dev-addons3-mtr1/+merge/46118
Your team OpenERP R&D Team is requested to review the proposed merge of lp:~openerp-commiter/openobject-addons/trunk-dev-addons3-mtr1 into lp:~openerp-dev/openobject-addons/trunk-dev-addons3.
=== modified file 'hr_timesheet/report/user_timesheet.py'
--- hr_timesheet/report/user_timesheet.py	2010-12-30 09:58:09 +0000
+++ hr_timesheet/report/user_timesheet.py	2011-01-13 11:57:46 +0000
@@ -27,6 +27,7 @@
 import time
 import pooler
 from report import report_sxw
+import unicodedata
 
 def lengthmonth(year, month):
     if month == 2 and ((year % 4 == 0) and ((year % 100 != 0) or (year % 400 == 0))):
@@ -49,6 +50,9 @@
         emp_obj = pooler.get_pool(cr.dbname).get('hr.employee')
         user_id = emp_obj.browse(cr, uid, emp_id).user_id.id
         empl_name = emp_obj.browse(cr, uid, emp_id).name
+        if isinstance(empl_name,unicode):
+            empl_name = (unicodedata.normalize('NFKD', unicode(empl_name)).encode('ASCII', 'ignore'))
+
  
         # Computing the dates (start of month: som, and end of month: eom)
         som = datetime.date(data['form']['year'], data['form']['month'], 1)

=== modified file 'hr_timesheet/report/users_timesheet.py'
--- hr_timesheet/report/users_timesheet.py	2010-12-30 09:58:09 +0000
+++ hr_timesheet/report/users_timesheet.py	2011-01-13 11:57:46 +0000
@@ -26,6 +26,7 @@
 import pooler
 from tools.translate import _
 from report import report_sxw
+import unicodedata
 
 
 def lengthmonth(year, month):
@@ -91,6 +92,9 @@
         for id in data['form']['employee_ids']:
             user = emp_obj.browse(cr, uid, id).user_id.id
             empl_name = emp_obj.browse(cr, uid, id).name
+            if isinstance(empl_name,unicode):
+                empl_name = (unicodedata.normalize('NFKD', unicode(empl_name)).encode('ASCII', 'ignore'))
+
             if user:
                 emp_xml += emp_create_xml(cr, user, som, eom, empl_name)
         # Computing the xml