Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eroare descarcare facturi ANAF #1004

Open
FreezeS opened this issue Jun 20, 2024 · 1 comment
Open

Eroare descarcare facturi ANAF #1004

FreezeS opened this issue Jun 20, 2024 · 1 comment
Labels
bug stale PR/Issue without recent activity, it'll be soon closed automatically.

Comments

@FreezeS
Copy link

FreezeS commented Jun 20, 2024

doc nu e initializat cand raspunsul de la ANAF nu e 200.

Eroare la descarcarea facturilor de pe ANAF, cand rulez manual scheduled action:

Odoo Server Error
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/tools/safe_eval.py", line 390, in safe_eval
    return unsafe_eval(c, globals_dict, locals_dict)
  File "ir.actions.server(1072,)", line 1, in <module>
  File "/mnt/extra-addons/OCA/l10n-romania/l10n_ro_account_edi_ubl/models/res_company.py", line 139, in _l10n_ro_create_anaf_efactura
    company_messages = company._l10n_ro_get_anaf_efactura_messages(filtru="P")
  File "/mnt/extra-addons/OCA/l10n-romania/l10n_ro_account_edi_ubl/models/res_company.py", line 115, in _l10n_ro_get_anaf_efactura_messages
    numar_total_pagini = doc.get("numar_total_pagini", 0)
UnboundLocalError: local variable 'doc' referenced before assignment

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1638, in _serve_db
    return service_model.retrying(self._serve_ir_http, self.env)
  File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 133, in retrying
    result = func()
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1665, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1869, in dispatch
    result = self.request.registry['ir.http']._dispatch(endpoint)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 154, in _dispatch
    result = endpoint(**request.params)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 700, in route_wrapper
    result = endpoint(self, *args, **params_ok)
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/dataset.py", line 46, in call_button
    action = self._call_kw(model, method, args, kwargs)
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/dataset.py", line 33, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 468, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 453, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_cron.py", line 103, in method_direct_trigger
    cron.with_user(cron.user_id).with_context({'lastcall': cron.lastcall}).ir_actions_server_id.run()
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_actions.py", line 674, in run
    res = runner(run_self, eval_context=eval_context)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_actions.py", line 544, in _run_action_code_multi
    safe_eval(self.code.strip(), eval_context, mode="exec", nocopy=True, filename=str(self))  # nocopy allows to return 'action'
  File "/usr/lib/python3/dist-packages/odoo/tools/safe_eval.py", line 404, in safe_eval
    raise ValueError('%s: "%s" while evaluating\n%r' % (ustr(type(e)), ustr(e), expr))
ValueError: <class 'UnboundLocalError'>: "local variable 'doc' referenced before assignment" while evaluating
'model._l10n_ro_create_anaf_efactura()'

The above server error caused the following client error:
RPC_ERROR://fact.5n.ro/web/assets/debug/web.assets_backend.js:10449:19) (/web/static/src/core/network/rpc_service.js:34)
    at XMLHttpRequest.<anonymous> (https://fact.5n.ro/web/assets/debug/web.assets_backend.js:10502:27) (/web/static/src/core/network/rpc_service.js:87)```
@FreezeS FreezeS added the bug label Jun 20, 2024
Copy link

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

No branches or pull requests

1 participant