Error al generar el reporte de pólizas si alguna de las descripciones contienen caractéres especiales
La póliza que generó problemas se encuentra ilustrada en la captura de pantalla
La traza de error generada en el log de OpenERP es la siguiente:
2014-12-03 02:05:39,283 8777 ERROR demo_diot openerp.service.web_services: Exception: 'ascii' codec can't encode character u'\xed' in position 7: ordinal not in range(128)
Traceback (most recent call last):
File "/home/agustin/Documents/OpenRestaurant/server/openerp/service/web_services.py", line 712, in go
(result, format) = obj.create(cr, uid, ids, datas, context)
File "/home/agustin/Documents/OpenRestaurant/l10n_mx/report_xml/report_xml.py", line 62, in create
return self._create_source(cr, uid, ids, data, context)
File "/home/agustin/Documents/OpenRestaurant/l10n_mx/report_xml/report_xml.py", line 77, in _create_source
fname = self.generate_report(_p, data, objs)
File "/home/agustin/Documents/OpenRestaurant/l10n_mx/l10n_mx_eaccounting/report/journal_entries_xml.py", line 365, in generate_report
poliza.set("Num", str(journal_entry_num))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in position 7: ordinal not in range(128)
2014-12-03 02:05:39,363 8777 ERROR demo_diot openerp.netsvc: ascii
Mercancía descompuesta
7
8
ordinal not in range(128)
(<type 'exceptions.UnicodeEncodeError'>, UnicodeEncodeError('ascii', u'Mercanc\xeda descompuesta', 7, 8, 'ordinal not in range(128)'), <traceback object at 0x7f6d1db7a5a8>)
Traceback (most recent call last):
File "/home/agustin/Documents/OpenRestaurant/server/openerp/netsvc.py", line 292, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "/home/agustin/Documents/OpenRestaurant/server/openerp/service/web_services.py", line 654, in dispatch
res = fn(db, uid, *params)
File "/home/agustin/Documents/OpenRestaurant/server/openerp/service/web_services.py", line 760, in exp_report_get
return self._check_report(report_id)
File "/home/agustin/Documents/OpenRestaurant/server/openerp/service/web_services.py", line 738, in _check_report
netsvc.abort_response(exc, exc.message, 'warning', exc.traceback)
File "/home/agustin/Documents/OpenRestaurant/server/openerp/netsvc.py", line 71, in abort_response
raise openerp.osv.osv.except_osv(description, details)
except_osv: (u'ascii\nMercanc\xeda descompuesta\n7\n8\nordinal not in range(128)', (<type 'exceptions.UnicodeEncodeError'>, UnicodeEncodeError('ascii', u'Mercanc\xeda descompuesta', 7, 8, 'ordinal not in range(128)'), <traceback object at 0x7f6d1db7a5a8>))