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

[14.0][IMP] l10n_br_fiscal_dfe: use xsdata bindings #3150

Draft
wants to merge 2 commits into
base: 14.0
Choose a base branch
from

Conversation

rvalyi
Copy link
Member

@rvalyi rvalyi commented Jul 2, 2024

ate a nfelib 2.0.7 o binding de retorno da DFe era esse binding legacy generateDS https://github.com/akretion/nfelib/blob/2.0.7/nfelib/v4_00/retDistDFeInt.py

Porem desde a nfelib 2.1.1, tirei os bindings legacy generateDS e tem que usar agora: https://github.com/akretion/nfelib/blob/master/nfelib/nfe_dist_dfe/bindings/v1_0/ret_dist_dfe_int_v1_01.py

No segundo commit fiz uma mudança semelhante no teste da MDe.

Aqui no projeto eu comentava sobre essa mudança faz um tempo e aqui eu tinha avisado que eu limparia a nfelib dos bindings legacy generateDS akretion/nfelib#106
O nome da class eh diferente (mais "pythonico") mas os campos do binding sao iguais.

Obs: para a Nfe ja faz mais de 1 ano que eu fiz a migracao no l10n-brazil.

@rvalyi
Copy link
Member Author

rvalyi commented Jul 2, 2024

aff ainda temos um problema no erpbrasil.edoc que usa os antigos bindings generateDS. Vamos pensar na melhor forma de resolver, talvez por hoje a melhor opcao eh forcar a nfelib==2.0.7 ate atualizar o erpbrasil.edoc...

 2024-07-02 02:18:35,739 562 INFO odoo odoo.addons.l10n_br_nfe.tests.test_nfe_webservices: ====================================================================== 
2024-07-02 02:18:35,740 562 ERROR odoo odoo.addons.l10n_br_nfe.tests.test_nfe_webservices: ERROR: TestNFeWebservices.test_inutilizar
Traceback (most recent call last):
  File "/__w/l10n-brazil/l10n-brazil/l10n_br_nfe/tests/mock_utils.py", line 47, in wrapper
    return func(*args, **kwargs)
  File "/__w/l10n-brazil/l10n-brazil/l10n_br_nfe/tests/test_nfe_webservices.py", line 93, in test_inutilizar
    inutilizar_wizard.doit()
  File "/__w/l10n-brazil/l10n-brazil/l10n_br_fiscal/wizards/invalidate_number_wizard.py", line 28, in doit
    wizard.do_invalidate()
  File "/__w/l10n-brazil/l10n-brazil/l10n_br_fiscal/wizards/invalidate_number_wizard.py", line 24, in do_invalidate
    invalidate._invalidate(self.document_id)
  File "/__w/l10n-brazil/l10n-brazil/l10n_br_nfe/models/invalidate_number.py", line 41, in _invalidate
    evento = processador.inutilizacao(
  File "/opt/odoo-venv/lib/python3.8/site-packages/erpbrasil/edoc/nfe.py", line 953, in inutilizacao
    raiz = retInutNFe.infInutType(
NameError: name 'retInutNFe' is not defined

@antoniospneto
Copy link
Contributor

@rvalyi
Adptar esse método do erpbrasil.edoc dentro do nfelib, igual a gente fez com os outros?
https://github.com/akretion/nfelib/blob/master/nfelib/nfe/ws/edoc_legacy.py

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

Successfully merging this pull request may close these issues.

3 participants