TICK-001562 - No funciona boton Forzar Envio
Ticket Resuelto
Cliente:
Teresa Abusleme Y Compania Limitada, Sergio Duran
Equipo:
Mesa de Ayuda 3er nivel
Ejecutiv@:
Admin
Fecha de creación:
12/04/2021 22:15:50
Email:
Teléfono:
Fecha de cierre:
20/05/2021 06:24:27
Categoría:
Descripción:
Error:
Odoo Server Error
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/tools/safe_eval.py", line 350, in safe_eval
return unsafe_eval(c, globals_dict, locals_dict)
File "", line 31, in <module>
File "/orion/extra-addons/l10n_cl_dte_factoring/models/sii_cola_envio.py", line 43, in _cron_procesar_cola
super(ColaEnvio, self)._cron_procesar_cola()
File "/orion/extra-addons/l10n_cl_fe/models/sii_cola_envio.py", line 183, in _cron_procesar_cola
ids = self.search([("active", "=", True), ('tipo_trabajo', '=', 'pasivo')], limit=20)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 1501, in search
res = self._search(args, offset=offset, limit=limit, order=order, count=count)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 3856, in _search
self._cr.execute(query_str, where_clause_params)
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 155, in wrapper
return f(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 232, in execute
res = self._obj.execute(query, params)
psycopg2.errors.InFailedSqlTransaction: current transaction is aborted, commands ignored until end of transaction block
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 653, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 312, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/usr/lib/python3/dist-packages/odoo/http.py", line 695, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 344, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 337, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 939, in __call__
return self.method(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 517, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1231, in run
result = request.env['ir.actions.server'].browse([action_id]).run()
File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_actions.py", line 557, in run
res = func(action, eval_context=eval_context)
File "/usr/lib/python3/dist-packages/odoo/addons/website/models/ir_actions.py", line 57, in run_action_code_multi
res = super(ServerAction, self).run_action_code_multi(action, eval_context)
File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_actions.py", line 433, in run_action_code_multi
safe_eval(action.sudo().code.strip(), eval_context, mode="exec", nocopy=True) # nocopy allows to return 'action'
File "/usr/lib/python3/dist-packages/odoo/tools/safe_eval.py", line 373, in safe_eval
pycompat.reraise(ValueError, ValueError('%s: "%s" while evaluating\n%r' % (ustr(type(e)), ustr(e), expr)), exc_info[2])
File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 86, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3/dist-packages/odoo/tools/safe_eval.py", line 350, in safe_eval
return unsafe_eval(c, globals_dict, locals_dict)
File "", line 31, in <module>
File "/orion/extra-addons/l10n_cl_dte_factoring/models/sii_cola_envio.py", line 43, in _cron_procesar_cola
super(ColaEnvio, self)._cron_procesar_cola()
File "/orion/extra-addons/l10n_cl_fe/models/sii_cola_envio.py", line 183, in _cron_procesar_cola
ids = self.search([("active", "=", True), ('tipo_trabajo', '=', 'pasivo')], limit=20)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 1501, in search
res = self._search(args, offset=offset, limit=limit, order=order, count=count)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 3856, in _search
self._cr.execute(query_str, where_clause_params)
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 155, in wrapper
return f(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 232, in execute
res = self._obj.execute(query, params)
ValueError: <class 'psycopg2.errors.InFailedSqlTransaction'>: "current transaction is aborted, commands ignored until end of transaction block
" while evaluating
'# Available variables:\n# - env: Odoo Environment on which the action is triggered\n# - model: Odoo Model of the record on which the action is triggered; is a void recordset\n# - record: record on which the action is triggered; may be void\n# - records: recordset of all records on which the action is triggered in multi-mode; may be void\n# - time, datetime, dateutil, timezone: useful Python libraries\n# - log: log(message, level=\'info\'): logging function to record debug information in ir.logging table\n# - Warning: Warning Exception to use with raise\n# To return an action, assign: action = {...}\n\nfacturas = []\nfacturas_no_procesadas = env["account.invoice"].search([(\'sii_result\',\n \'not in\',\n [\'Rechazado\', \'Reparo\', \'Proceso\', \'Anulado\', \'Enviado\', \'Aceptado\']\n ), \n (\'sii_xml_dte\', \'!=\', False),(\'type\', \'in\', [\'out_invoice\',\'out_refund\'])\n ])\nif facturas_no_procesadas:\n for fac in facturas_no_procesadas:\n facturas.append(\'[\' + str(fac.id) + \']\')\n fac.write({\'sii_result\': \'NoEnviado\'})\n \ncola_de_envio = env["sii.cola_envio"].search([(\'doc_ids\', \'in\', facturas)])\nif cola_de_envio:\n for rec in cola_de_envio:\n rec.unlink()\n \nfor fac in facturas_no_procesadas:\n fac.do_dte_send_invoice()\n\nmodel._cron_procesar_cola()'