Error generación XML

Asked by Diego Calzadilla on 2014-02-24

Buenas tardes a todos, espero se encuentren muy bien.

Tengo problemas para generar el xml de las facturas, explico

Se realiza el procedimiento para generar una factura y timbre, no manda error alguno al supuestamente “timbrarse” pero se procede a revisar que se genere el PDF y XML correctamente y aparece el xml pero al abrir esta vacío y manda un error:

Internal Server Error

{"message": "OpenERP WebClient Error", "code": 300, "data": {"debug": "Client Traceback (most recent call last):\n File \"/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/addons/web/http.py\", line 285, in dispatch\n r = method(self, **self.params)\n File \"/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/addons/web/controllers/main.py\", line 1281, in saveas\n filecontent = base64.b64decode(res.get(field, ''))\n File \"/opt/bitnami/python/lib/python2.7/base64.py\", line 73, in b64decode\n return binascii.a2b_base64(s)\nTypeError: must be string or buffer, not bool\n", "type": "client_exception"}}

Al querer realizar el timbrado nuevamente de la factura me manda el siguiente error:

Server Traceback (most recent call last):
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/addons/web/session.py", line 89, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/netsvc.py", line 292, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/service/web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/osv/osv.py", line 188, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/osv/osv.py", line 131, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/osv/osv.py", line 197, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/osv/osv.py", line 185, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/addons/l10n_mx_facturae_pac_sf/wizard/wizard_export_invoice_pac_sf_v6.py", line 63, in upload_to_pac
    res = invoice_obj._upload_ws_file(cr, uid, context['active_ids'])
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/addons/l10n_mx_facturae_pac_sf/invoice.py", line 281, in _upload_ws_file
    xml_res_str = xml.dom.minidom.parseString(cfd_data)
  File "/opt/bitnami/python/lib/python2.7/site-packages/_xmlplus/dom/minidom.py", line 1925, in parseString
    return expatbuilder.parseString(string)
  File "/opt/bitnami/python/lib/python2.7/site-packages/_xmlplus/dom/expatbuilder.py", line 942, in parseString
    return builder.parseString(string)
  File "/opt/bitnami/python/lib/python2.7/site-packages/_xmlplus/dom/expatbuilder.py", line 223, in parseString
    parser.Parse(string, True)
ExpatError: no element found: line 1, column 0

Al cancelar una factura que tiene problemas con el xml, como explico al principio me genera el siguiente error:

Server Traceback (most recent call last):
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/addons/web/session.py", line 89, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/netsvc.py", line 292, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/service/web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/osv/osv.py", line 131, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/osv/osv.py", line 220, in exec_workflow
    res = self.exec_workflow_cr(cr, uid, obj, signal, *args)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/osv/osv.py", line 213, in exec_workflow_cr
    return object._workflow_signal(cr, uid, [res_id], signal)[res_id]
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/osv/orm.py", line 3926, in _workflow_signal
    result[res_id] = wf_service.trg_validate(uid, self._name, res_id, signal, cr)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/workflow/wkf_service.py", line 119, in trg_validate
    res2 = instance.validate(cr, id, ident, signal)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/workflow/instance.py", line 43, in validate
    workitem.process(cr, witem, ident, signal, force_running, stack=stack)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/workflow/workitem.py", line 60, in process
    ok = _split_test(cr, workitem, activity['split_mode'], ident, signal, stack)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/workflow/workitem.py", line 175, in _split_test
    _join_test(cr, t[0], t[1], ident, stack)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/workflow/workitem.py", line 183, in _join_test
    create(cr,[activity], inst_id, ident, stack)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/workflow/workitem.py", line 40, in create
    process(cr, res, ident, stack=stack)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/workflow/workitem.py", line 52, in process
    result = _execute(cr, workitem, activity, ident, stack)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/workflow/workitem.py", line 106, in _execute
    returned_action = wkf_expr.execute(cr, ident, workitem, activity)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/workflow/wkf_expr.py", line 67, in execute
    return _eval_expr(cr, ident, workitem, activity['action'])
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/workflow/wkf_expr.py", line 57, in _eval_expr
    ret = eval(line, env, nocopy=True)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/tools/safe_eval.py", line 241, in safe_eval
    return eval(test_expr(expr, _SAFE_OPCODES, mode=mode), globals_dict, locals_dict)
  File "", line 1, in <module>
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/osv/orm.py", line 374, in function_proxy
    return attr(self._cr, self._uid, [self._id], *args, **kwargs)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/addons/l10n_mx_facturae/invoice.py", line 260, in action_cancel
    return super(account_invoice, self).action_cancel(cr, uid, ids, context=context)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/addons/l10n_mx_ir_attachment_facturae/invoice.py", line 52, in action_cancel
    attachment.id, 'action_cancel', cr)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/workflow/wkf_service.py", line 119, in trg_validate
    res2 = instance.validate(cr, id, ident, signal)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/workflow/instance.py", line 43, in validate
    workitem.process(cr, witem, ident, signal, force_running, stack=stack)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/workflow/workitem.py", line 60, in process
    ok = _split_test(cr, workitem, activity['split_mode'], ident, signal, stack)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/workflow/workitem.py", line 175, in _split_test
    _join_test(cr, t[0], t[1], ident, stack)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/workflow/workitem.py", line 183, in _join_test
    create(cr,[activity], inst_id, ident, stack)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/workflow/workitem.py", line 40, in create
    process(cr, res, ident, stack=stack)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/workflow/workitem.py", line 52, in process
    result = _execute(cr, workitem, activity, ident, stack)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/workflow/workitem.py", line 106, in _execute
    returned_action = wkf_expr.execute(cr, ident, workitem, activity)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/workflow/wkf_expr.py", line 67, in execute
    return _eval_expr(cr, ident, workitem, activity['action'])
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/workflow/wkf_expr.py", line 57, in _eval_expr
    ret = eval(line, env, nocopy=True)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/tools/safe_eval.py", line 241, in safe_eval
    return eval(test_expr(expr, _SAFE_OPCODES, mode=mode), globals_dict, locals_dict)
  File "", line 1, in <module>
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/osv/orm.py", line 374, in function_proxy
    return attr(self._cr, self._uid, [self._id], *args, **kwargs)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/addons/l10n_mx_ir_attachment_facturae/ir_attachment_facturae.py", line 323, in action_cancel
    'res_id': False, }, context={})
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/addons/base_calendar/crm_meeting.py", line 160, in write
    return super(ir_attachment, self).write(cr, uid, ids, vals, context=context)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/addons/document/document.py", line 132, in write
    return super(document_file, self).write(cr, uid, ids, vals, context)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/addons/base/ir/ir_attachment.py", line 268, in write
    self.check(cr, uid, ids, 'write', context=context, values=vals)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20130725_231029-py2.7.egg/openerp/addons/document/document.py", line 78, in check
    cr.execute('SELECT DISTINCT parent_id from ir_attachment WHERE id in %s AND parent_id is not NULL', (tuple(ids),))
TypeError: 'int' object is not iterable

Y al verificar en el PAC si la factura fue timbrada exitosamente resulta que no se timbro la factura

Saludos!!

Question information

Language:
Spanish Edit question
Status:
Open
For:
openerp-mexico-localization Edit question
Assignee:
No assignee Edit question
Last query:
2014-02-24
Last reply:

Can you help with this problem?

Provide an answer of your own, or ask Diego Calzadilla for more information if necessary.

To post a message you must log in.