← Back to team overview

openerp-india team mailing list archive

[Bug 1207810] Re: [7.0] test hr_holidays/test/hr_holidays_report.yml fails when run in August

 

Related to my duplicate Bug #1217794, I would say that the bug is not
because OpenERP locale, but system locale. OpenERP use an UTF8 string
returned by strftime("%B") if your system is in UTF8, but this will
cause a bug if you use a language with special chars in your system.

If OpenERP is in en_US and no other locale is installed on OpenERP but
your linux is in fr_CH, strftime("%B") will return "août" for august in
an UTF8 string if system locale is fr_CH.UTF8

To reproduce this bug, launch OpenERP in august with automated tests and before set the system locale :
$ export LANG=fr_CH.UTF-8 

The tests will fail, with the last OpenERP revision too !

-- 
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/1207810

Title:
  [7.0] test hr_holidays/test/hr_holidays_report.yml fails when run in
  August

Status in OpenERP Addons (modules):
  Invalid

Bug description:
  When this YAML tets in run in august, it fails:

  UnicodeDecodeError('ascii', '<date month="ao\xfbt" year="2013" />', 15, 16, 'ordinal not in range(128)')
  Stacktrace

  Traceback (most recent call last):
    File "C:\Jenkins\vlabus_test\openerp\addons-external\vlabus_smile_test\smile_test.py", line 166, in test
      self._run_test(new_cr, module_name, filename)
    File "C:\Jenkins\vlabus_test\openerp\addons-external\vlabus_smile_test\smile_test.py", line 74, in _run_test
      tools.convert_yaml_import(cr, module_name, open_file, kind='test', idref=None, mode='update', noupdate=False)
    File "C:\Jenkins\vlabus_test\openerp\openerp-server\openerp\tools\yaml_import.py", line 928, in yaml_import
      yaml_interpreter.process(yaml_string)
    File "C:\Jenkins\vlabus_test\openerp\openerp-server\openerp\tools\yaml_import.py", line 864, in process
      self._process_node(node)
    File "C:\Jenkins\vlabus_test\openerp\openerp-server\openerp\tools\yaml_import.py", line 877, in _process_node
      self.process_python(node)
    File "C:\Jenkins\vlabus_test\openerp\openerp-server\openerp\tools\yaml_import.py", line 550, in process_python
      unsafe_eval(code_obj, {'ref': self.get_id}, code_context)
    File "C:\Jenkins\vlabus_test\openerp\openerp-server\openerp\addons\hr_holidays\test\hr_holidays_report.yml", line 6, in <module>
      ctx={}
    File "C:\Jenkins\vlabus_test\openerp\openerp-server\openerp\tools\test_reports.py", line 294, in try_report_action
      result = _exec_action(action, datas, context)
    File "C:\Jenkins\vlabus_test\openerp\openerp-server\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 "C:\Jenkins\vlabus_test\openerp\openerp-server\openerp\tools\test_reports.py", line 53, in try_report
      res = netsvc.LocalService(rname).create(cr, uid, ids, data, context)
    File "C:\Jenkins\vlabus_test\openerp\openerp-server\openerp\report\interface.py", line 83, in create
      xml = self.create_xml(cr, uid, ids, datas, context)
    File "C:\Jenkins\vlabus_test\openerp\openerp-server\openerp\addons\hr_holidays\report\holidays_summary_report.py", line 203, in create_xml
      date_xml = ''.join(date_xml)
  UnicodeDecodeError: 'ascii' codec can't decode byte 0xfb in position 15: ordinal not in range(128)

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


References