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

[V16] Problema descarcare automata facturi #905

Closed
FreezeS opened this issue Mar 25, 2024 · 1 comment
Closed

[V16] Problema descarcare automata facturi #905

FreezeS opened this issue Mar 25, 2024 · 1 comment
Labels

Comments

@FreezeS
Copy link

FreezeS commented Mar 25, 2024

Salutare,

De ceva timp nu mai merge scriptul de descarcare automata a facturilor, primesc urmatoarea eroare:

RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/tools/safe_eval.py", line 365, 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 149, in _l10n_ro_create_anaf_efactura
    invoice = move_obj.search(
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 1519, in search
    res = self._search(domain, offset=offset, limit=limit, order=order, count=count)
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 4680, in _search
    self._flush_search(domain, order=order)
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 4658, in _flush_search
    self.env[model_name].flush_model(field_names)
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 5620, in flush_model
    self._recompute_model(fnames)
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 6218, in _recompute_model
    self._recompute_field(field)
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 6246, in _recompute_field
    field.recompute(records)
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1370, in recompute
    apply_except_missing(self.compute_value, recs)
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1343, in apply_except_missing
    func(records)
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1392, in compute_value
    records._compute_field_value(self)
  File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_thread.py", line 403, in _compute_field_value
    return super()._compute_field_value(field)
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 4232, in _compute_field_value
    fields.determine(field.compute, self)
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 98, in determine
    return needle(*args)
  File "/usr/lib/python3/dist-packages/odoo/addons/account/models/account_move.py", line 699, in _compute_name
    move._set_next_sequence()
  File "/mnt/extra-addons/OCA/l10n-romania/l10n_ro_payment_to_statement/models/account_move.py", line 66, in _set_next_sequence
    return super(AccountMove, self)._set_next_sequence()
  File "/usr/lib/python3/dist-packages/odoo/addons/account_sequence/models/sequence_mixin.py", line 32, in _set_next_sequence
    self.flush_recordset()
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 5631, in flush_recordset
    self._recompute_recordset(fnames)
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 6232, in _recompute_recordset
    self._recompute_field(field, self._ids)
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 6246, in _recompute_field
    field.recompute(records)
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1370, in recompute
    apply_except_missing(self.compute_value, recs)
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1343, in apply_except_missing
    func(records)
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1392, in compute_value
    records._compute_field_value(self)
  File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_thread.py", line 403, in _compute_field_value
    return super()._compute_field_value(field)
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 4232, in _compute_field_value
    fields.determine(field.compute, self)
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 98, in determine
    return needle(*args)
  File "/mnt/extra-addons/OCA/l10n-romania/l10n_ro_account_report_invoice/models/account_move.py", line 16, in _compute_l10n_ro_currency_rate
    currency_rate = self.env["res.currency"]._get_conversion_rate(
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/res_currency.py", line 252, in _get_conversion_rate
    res = currency_rates.get(to_currency.id) / currency_rates.get(from_currency.id)
TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1633, 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 1660, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1864, 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 697, 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 94, 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 379, in safe_eval
    raise ValueError('%s: "%s" while evaluating\n%r' % (ustr(type(e)), ustr(e), expr))
ValueError: <class 'TypeError'>: "unsupported operand type(s) for /: 'NoneType' and 'float'" while evaluating
'model._l10n_ro_create_anaf_efactura()'

Sunt relativ la zi cu update-urile, tocmai am actualizat modulele din eroare: l10n_ro_account_edi_ubl, l10n_ro_payment_to_statement, l10n_ro_account_report_invoice si l10n_ro_config.

Am setate doua companii, pe fiecare e configurata e-factura (se pot trimite facturi fara probleme), valutele sunt sincronizate prin BNR din Decembrie 2023. Am incercat sa rulez actiunea de pe ambele firme, primesc aceasi eroare.

Este vreo setare noua introdusa intr-o actualizare?
Ce ar trebui sa verific?

@FreezeS FreezeS added the bug label Mar 25, 2024
@feketemihai
Copy link
Member

Dupa eroare nu ai nici un curs de schimb pe ceva valuta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants