← Back to team overview

openerp-india team mailing list archive

[Bug 1282255] Re: [7.0][hr_holidays] [holidays_summary_report] 'ascii' codec can't decode byte 0xc3 in position 24: ordinal not in range(128)

 

** Also affects: openobject-addons/7.0
   Importance: Undecided
       Status: New

** Changed in: openobject-addons
     Assignee: OpenERP Publisher's Warranty Team (openerp-opw) => (unassigned)

** Changed in: openobject-addons/7.0
     Assignee: (unassigned) => OpenERP Publisher's Warranty Team (openerp-opw)

** Changed in: openobject-addons/7.0
   Importance: Undecided => Low

** Changed in: openobject-addons/7.0
       Status: New => Confirmed

** Changed in: openobject-addons/7.0
       Status: Confirmed => In Progress

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1282255

Title:
  [7.0][hr_holidays] [holidays_summary_report] 'ascii' codec can't
  decode byte 0xc3 in position 24: ordinal not in range(128)

Status in OpenERP Addons (modules):
  New
Status in OpenERP Addons 7.0 series:
  In Progress

Bug description:
  1)  Steps to reproduce the issue you have observed
  Change your lang and locale configuration of S.O. to Spanish-Mexico
  Ejecuta test "hr_holidays"

  2) The result you observed
  2014-02-19 19:52:35,785 8336 TEST 70-oml-all-10 openerp.tools.yaml_import: Print the HR Holidays(Summary Department) Report through the wizard
  2014-02-19 19:52:35,845 8336 ERROR 70-oml-all-10 openerp.tools.yaml_import: 'ascii' codec can't decode byte 0xc3 in position 24: ordinal not in range(128)
  Traceback (most recent call last):
    File "../7.0/server/7.0/openerp/tools/yaml_import.py", line 864, in process
      self._process_node(node)
    File "../7.0/server/7.0/openerp/tools/yaml_import.py", line 877, in _process_node
      self.process_python(node)
    File "../7.0/server/7.0/openerp/tools/yaml_import.py", line 550, in process_python
      unsafe_eval(code_obj, {'ref': self.get_id}, code_context)
    File "../7.0/addons_all/openobject-addons/7.0/hr_holidays/test/hr_holidays_report.yml", line 6, in <module>
      ctx={}
    File "../7.0/server/7.0/openerp/tools/test_reports.py", line 294, in try_report_action
      result = _exec_action(action, datas, context)
    File "../7.0/server/7.0/openerp/tools/test_reports.py", line 278, in _exec_action
      res = try_report(cr, uid, 'report.'+action['report_name'], ids, datas, context, our_module=our_module)
    File "../7.0/server/7.0/openerp/tools/test_reports.py", line 53, in try_report
      res = netsvc.LocalService(rname).create(cr, uid, ids, data, context)
    File "../7.0/server/7.0/openerp/report/interface.py", line 83, in create
      xml = self.create_xml(cr, uid, ids, datas, context)
    File "../7.0/addons_all/openobject-addons/7.0/hr_holidays/report/holidays_summary_report.py", line 205, in create_xml
      date_xml = ''.join(date_xml)
  UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 24: ordinal not in range(128)

  3) The result you expected
  Test passed

  
  *Extra info.
  I extract var date_xml_list from 
  http://bazaar.launchpad.net/~openerp/openobject-addons/7.0/view/head:/hr_holidays/report/holidays_summary_report.py#L203

  The result was
  date_xml_list = [u'<res name="Your Company, Chicago shop" today="2014-02-19 19:52:35" />', '<from>02/01/2014</from>\n', '<to>04/01/2014</to>\n', u'<type>Approved</type>', '<name></name>', u'<legend row="1" id="1" name="Legal Leaves 2014" color="black" />', u'<legend row="2" id="2" name="Sick Leaves" color="red" />', u'<legend row="3" id="3" name="Compensatory Days" color="lavender" />', u'<legend row="4" id="4" name="Unpaid" color="brown" />', u'<legend row="5" id="5" name="Heures Supplementaires" color="lightblue" />', u'<date month="febrero" year="2014" />', '<days>', '<dayy number="1" name="s\xc3\xa1b" cell="1"/>', '<dayy number="2" name="dom" cell="2"/>', '<dayy number="3" name="lun" cell="3"/>', '<dayy number="4" name="mar" cell="4"/>', '<dayy number="5" name="mi\xc3\xa9" cell="5"/>', '<dayy number="6" name="jue" cell="6"/>', '<dayy number="7" name="vie" cell="7"/>', '<dayy number="8" name="s\xc3\xa1b" cell="8"/>', '<dayy number="9" name="dom" cell="9"/>', '<dayy number="10" name="lun" cell="10"/>', '<dayy number="11" name="mar" cell="11"/>', '<dayy number="12" name="mi\xc3\xa9" cell="12"/>', '<dayy number="13" name="jue" cell="13"/>', '<dayy number="14" name="vie" cell="14"/>', '<dayy number="15" name="s\xc3\xa1b" cell="15"/>', '<dayy number="16" name="dom" cell="16"/>', '<dayy number="17" name="lun" cell="17"/>', '<dayy number="18" name="mar" cell="18"/>', '<dayy number="19" name="mi\xc3\xa9" cell="19"/>', '<dayy number="20" name="jue" cell="20"/>', '<dayy number="21" name="vie" cell="21"/>', '<dayy number="22" name="s\xc3\xa1b" cell="22"/>', '<dayy number="23" name="dom" cell="23"/>', '<dayy number="24" name="lun" cell="24"/>', '<dayy number="25" name="mar" cell="25"/>', '<dayy number="26" name="mi\xc3\xa9" cell="26"/>', '<dayy number="27" name="jue" cell="27"/>', '<dayy number="28" name="vie" cell="28"/>', '<dayy number="1" name="s\xc3\xa1b" cell="29"/>', '<dayy number="2" name="dom" cell="30"/>', '<dayy number="3" name="lun" cell="31"/>', '<dayy number="4" name="mar" cell="32"/>', '<dayy number="5" name="mi\xc3\xa9" cell="33"/>', '<dayy number="6" name="jue" cell="34"/>', '<dayy number="7" name="vie" cell="35"/>', '<dayy number="8" name="s\xc3\xa1b" cell="36"/>', '<dayy number="9" name="dom" cell="37"/>', '<dayy number="10" name="lun" cell="38"/>', '<dayy number="11" name="mar" cell="39"/>', '<dayy number="12" name="mi\xc3\xa9" cell="40"/>', '<dayy number="13" name="jue" cell="41"/>', '<dayy number="14" name="vie" cell="42"/>', '<dayy number="15" name="s\xc3\xa1b" cell="43"/>', '<dayy number="16" name="dom" cell="44"/>', '<dayy number="17" name="lun" cell="45"/>', '<dayy number="18" name="mar" cell="46"/>', '<dayy number="19" name="mi\xc3\xa9" cell="47"/>', '<dayy number="20" name="jue" cell="48"/>', '<dayy number="21" name="vie" cell="49"/>', '<dayy number="22" name="s\xc3\xa1b" cell="50"/>', '<dayy number="23" name="dom" cell="51"/>', '<dayy number="24" name="lun" cell="52"/>', '<dayy number="25" name="mar" cell="53"/>', '<dayy number="26" name="mi\xc3\xa9" cell="54"/>', '<dayy number="27" name="jue" cell="55"/>', '<dayy number="28" name="vie" cell="56"/>', '<dayy number="29" name="s\xc3\xa1b" cell="57"/>', '<dayy number="30" name="dom" cell="58"/>', '<dayy number="31" name="lun" cell="59"/>', '<dayy number="1" name="mar" cell="60"/>', '</days>', '<cols>3.5cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm,0.4cm</cols>\n']

  I generate a python script with this:
  for i in range( len( date_xml_list) ):
      print i
      try:
          date_xml = ''.join( date_xml_list[:i] )
      except:
          break
  print date_xml_list[i-1]
  ###resultado = '<dayy number="1" name="sáb" cell="1"/>'

  
  This is because Saturday in spanish is: "Sábado"
  This accent make a error.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1282255/+subscriptions


References