Error al generar el reporte de pólizas si la póliza contable no tiene referencia
Si por alguna razón el campo referencia en la póliza contable se deja en blanco, el reporte de pólizas falla al generarse y el siguiente error se muestra en la traza de OpenERP:
2014-12-03 02:04:59,037 8777 ERROR demo_diot openerp.service.web_services: Exception: 'bool' object has no attribute 'encode'
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 362, in generate_report
(journal_entry_concept).encode('utf-8', 'ignore').decode('utf-8'),
AttributeError: 'bool' object has no attribute 'encode'
2014-12-03 02:04:59,176 8777 ERROR demo_diot openerp.netsvc: 'bool' object has no attribute 'encode'
(<type 'exceptions.AttributeError'>, AttributeError("'bool' object has no attribute 'encode'",), <traceback object at 0x7f6d1df45dd0>)
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"'bool' object has no attribute 'encode'", (<type 'exceptions.AttributeError'>, AttributeError("'bool' object has no attribute 'encode'",), <traceback object at 0x7f6d1df45dd0>))