Estou com certa dificuldade de configurar o nfc-e.
Gerei o CSC Token no Sefaz do RS.
O CSC code não sei aonde achar.
Ao tentar validar uma nfc-e, o seguinte erro aparece:
Erro:
Odoo Server Error
Traceback (most recent call last):
File "/odoo14/odoo14-server/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/odoo14/odoo14-server/odoo/http.py", line 696, in dispatch
result = self._call_function(self.params)
File "/odoo14/odoo14-server/odoo/http.py", line 370, in _call_function
return checked_call(self.db, *args, *kwargs)
File "/odoo14/odoo14-server/odoo/service/model.py", line 94, in wrapper
return f(dbname, args, kwargs)
File "/odoo14/odoo14-server/odoo/http.py", line 358, in checked_call
result = self.endpoint(*a, kw)
File "/odoo14/odoo14-server/odoo/http.py", line 919, in call
return self.method(*args, *kw)
File "/odoo14/odoo14-server/odoo/http.py", line 544, in response_wrap
response = f(args, kw)
File "/odoo14/odoo14-server/addons/web/controllers/main.py", line 1374, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/odoo14/odoo14-server/addons/web/controllers/main.py", line 1362, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/odoo14/odoo14-server/odoo/api.py", line 406, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/odoo14/odoo14-server/odoo/api.py", line 391, in _call_kw_multi
result = method(recs, *args, kwargs)
File "/odoo14/odoo14-server/addons/l10n_br_account_payment_order/models/account_move.py", line 92, in action_post
result = super().action_post()
File "/odoo14/odoo14-server/addons/sale/models/account_move.py", line 14, in action_post
res = super(AccountMove, self).action_post()
File "/odoo14/odoo14-server/addons/account/models/account_move.py", line 2823, in action_post
self._post(soft=False)
File "/odoo14/odoo14-server/addons/l10n_br_account_payment_brcobranca/models/account_move.py", line 84, in _post
result = super()._post(soft)
File "/odoo14/odoo14-server/addons/l10n_br_account_withholding/models/account_move.py", line 173, in _post
res = super()._post(soft)
File "/odoo14/odoo14-server/addons/l10n_br_account/models/account_move.py", line 602, in _post
)._document_confirm_to_send()
File "/odoo14/odoo14-server/addons/l10n_br_fiscal/models/document_workflow.py", line 311, in _document_confirm_to_send
to_confirm._document_confirm()
File "/odoo14/odoo14-server/addons/l10n_br_fiscal/models/document_workflow.py", line 304, in _document_confirm
self._change_state(SITUACAO_EDOC_A_ENVIAR)
File "/odoo14/odoo14-server/addons/l10n_br_fiscal/models/document_workflow.py", line 227, in _change_state
if record._before_change_state(old_state, new_state):
File "/odoo14/odoo14-server/addons/l10n_br_fiscal/models/document_workflow.py", line 123, in _before_change_state
return self._exec_before_SITUACAO_EDOC_A_ENVIAR(old_state, new_state)
File "/odoo14/odoo14-server/addons/l10n_br_fiscal/models/document_workflow.py", line 85, in _exec_before_SITUACAO_EDOC_A_ENVIAR
self._document_number()
File "/odoo14/odoo14-server/addons/l10n_br_nfe/models/document.py", line 838, in _document_number
result = super()._document_number()
File "/odoo14/odoo14-server/addons/l10n_br_fiscal/models/document_workflow.py", line 294, in _document_number
self._generate_key()
File "/odoo14/odoo14-server/addons/l10n_br_nfe/models/document.py", line 1012, in _generate_key
chave_edoc = ChaveEdoc(
File "/odoo14/.local/lib/python3.10/site-packages/erpbrasil/base/fiscal/edoc.py", line 126, in init
codigo_aleatorio = self.calculo_codigo_aleatorio(campos)
File "/odoo14/.local/lib/python3.10/site-packages/erpbrasil/base/fiscal/edoc.py", line 156, in calculo_codigo_aleatorio
soma += int(c) 3 ** 2
Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/odoo14/odoo14-server/odoo/http.py", line 652, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/odoo14/odoo14-server/odoo/http.py", line 317, in _handle_exception
raise exception.with_traceback(None) from new_cause
ValueError: invalid literal for int() with base 10: 's'
Penso que talvez seja o modulo erpbrasil que esteja com a versão desatualizada, mas não achei a informação de qual versão é necessária para a versão 14 do odoo.
Estou com certa dificuldade de configurar o nfc-e.
Gerei o CSC Token no Sefaz do RS. O CSC code não sei aonde achar.
Ao tentar validar uma nfc-e, o seguinte erro aparece:
Erro: Odoo Server Error
Traceback (most recent call last): File "/odoo14/odoo14-server/odoo/addons/base/models/ir_http.py", line 237, in _dispatch result = request.dispatch() File "/odoo14/odoo14-server/odoo/http.py", line 696, in dispatch result = self._call_function(self.params) File "/odoo14/odoo14-server/odoo/http.py", line 370, in _call_function return checked_call(self.db, *args, *kwargs) File "/odoo14/odoo14-server/odoo/service/model.py", line 94, in wrapper return f(dbname, args, kwargs) File "/odoo14/odoo14-server/odoo/http.py", line 358, in checked_call result = self.endpoint(*a, kw) File "/odoo14/odoo14-server/odoo/http.py", line 919, in call return self.method(*args, *kw) File "/odoo14/odoo14-server/odoo/http.py", line 544, in response_wrap response = f(args, kw) File "/odoo14/odoo14-server/addons/web/controllers/main.py", line 1374, in call_button action = self._call_kw(model, method, args, kwargs) File "/odoo14/odoo14-server/addons/web/controllers/main.py", line 1362, in _call_kw return call_kw(request.env[model], method, args, kwargs) File "/odoo14/odoo14-server/odoo/api.py", line 406, in call_kw result = _call_kw_multi(method, model, args, kwargs) File "/odoo14/odoo14-server/odoo/api.py", line 391, in _call_kw_multi result = method(recs, *args, kwargs) File "/odoo14/odoo14-server/addons/l10n_br_account_payment_order/models/account_move.py", line 92, in action_post result = super().action_post() File "/odoo14/odoo14-server/addons/sale/models/account_move.py", line 14, in action_post res = super(AccountMove, self).action_post() File "/odoo14/odoo14-server/addons/account/models/account_move.py", line 2823, in action_post self._post(soft=False) File "/odoo14/odoo14-server/addons/l10n_br_account_payment_brcobranca/models/account_move.py", line 84, in _post result = super()._post(soft) File "/odoo14/odoo14-server/addons/l10n_br_account_withholding/models/account_move.py", line 173, in _post res = super()._post(soft) File "/odoo14/odoo14-server/addons/l10n_br_account/models/account_move.py", line 602, in _post )._document_confirm_to_send() File "/odoo14/odoo14-server/addons/l10n_br_fiscal/models/document_workflow.py", line 311, in _document_confirm_to_send to_confirm._document_confirm() File "/odoo14/odoo14-server/addons/l10n_br_fiscal/models/document_workflow.py", line 304, in _document_confirm self._change_state(SITUACAO_EDOC_A_ENVIAR) File "/odoo14/odoo14-server/addons/l10n_br_fiscal/models/document_workflow.py", line 227, in _change_state if record._before_change_state(old_state, new_state): File "/odoo14/odoo14-server/addons/l10n_br_fiscal/models/document_workflow.py", line 123, in _before_change_state return self._exec_before_SITUACAO_EDOC_A_ENVIAR(old_state, new_state) File "/odoo14/odoo14-server/addons/l10n_br_fiscal/models/document_workflow.py", line 85, in _exec_before_SITUACAO_EDOC_A_ENVIAR self._document_number() File "/odoo14/odoo14-server/addons/l10n_br_nfe/models/document.py", line 838, in _document_number result = super()._document_number() File "/odoo14/odoo14-server/addons/l10n_br_fiscal/models/document_workflow.py", line 294, in _document_number self._generate_key() File "/odoo14/odoo14-server/addons/l10n_br_nfe/models/document.py", line 1012, in _generate_key chave_edoc = ChaveEdoc( File "/odoo14/.local/lib/python3.10/site-packages/erpbrasil/base/fiscal/edoc.py", line 126, in init codigo_aleatorio = self.calculo_codigo_aleatorio(campos) File "/odoo14/.local/lib/python3.10/site-packages/erpbrasil/base/fiscal/edoc.py", line 156, in calculo_codigo_aleatorio soma += int(c) 3 ** 2 Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/odoo14/odoo14-server/odoo/http.py", line 652, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/odoo14/odoo14-server/odoo/http.py", line 317, in _handle_exception raise exception.with_traceback(None) from new_cause ValueError: invalid literal for int() with base 10: 's'
Penso que talvez seja o modulo erpbrasil que esteja com a versão desatualizada, mas não achei a informação de qual versão é necessária para a versão 14 do odoo.