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

Erro ao gerar chave NFe #1247

Open
joeyice opened this issue Feb 2, 2023 · 1 comment
Open

Erro ao gerar chave NFe #1247

joeyice opened this issue Feb 2, 2023 · 1 comment

Comments

@joeyice
Copy link

joeyice commented Feb 2, 2023

Olá pessoal, estou tentando usar o módulo da TrustCode parar emitir NFes no Odoo, tentei instalar várias versões desde à 12 até a 16 e a única que consegui ter sucesso foi a versão 15.
Todo o processo para emissão acontece normalmente como demonstrado nos videos do Danimar, a NFe é validada com sucesso porém na hora de enviar ocorre erro na geração da chave da NFe: "name 'gerar_chave' is not defined".
Não sei se a versão 15 ainda é mantida, tentei também instalar a versão 16.0 do addon junto com a versão 16.0 do Odoo, porém acontecem outros erros na instalação do addon que não consegui resolver.
Segue erro completo:

RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
File "/home/vboxuser/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/home/vboxuser/odoo/odoo/http.py", line 687, in dispatch
result = self._call_function(**self.params)
File "/home/vboxuser/odoo/odoo/http.py", line 359, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/vboxuser/odoo/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/home/vboxuser/odoo/odoo/http.py", line 348, in checked_call
result = self.endpoint(*a, **kw)
File "/home/vboxuser/odoo/odoo/http.py", line 916, in call
return self.method(*args, **kw)
File "/home/vboxuser/odoo/odoo/http.py", line 535, in response_wrap
response = f(*args, **kw)
File "/home/vboxuser/odoo/addons/web/controllers/main.py", line 1346, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/home/vboxuser/odoo/addons/web/controllers/main.py", line 1334, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/vboxuser/odoo/odoo/api.py", line 464, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/home/vboxuser/odoo/odoo/api.py", line 451, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/home/vboxuser/odoo-brasil/l10n_br_eletronic_document/models/nfe.py", line 801, in action_send_eletronic_invoice
self.action_post_validate()
File "/home/vboxuser/odoo-brasil/l10n_br_eletronic_document/models/nfe.py", line 763, in action_post_validate
self.chave_nfe = gerar_chave(ChaveNFe(**chave_dict))
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/vboxuser/odoo/odoo/http.py", line 643, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/vboxuser/odoo/odoo/http.py", line 301, in _handle_exception
raise exception.with_traceback(None) from new_cause
NameError: name 'gerar_chave' is not defined

Agradeço préviamente pelo esforço e dedicação da equipe!

@ThiagoNerisRamos
Copy link

Boa tarde! ja tentou a instalação da biblioteca pytrustnfe / pytrustnfe3

:)

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

No branches or pull requests

2 participants