Skip to content

Comments

[REF] Barueri Refactor#93

Open
marcelsavegnago wants to merge 4 commits intoerpbrasil:masterfrom
Escodoo:master-escodoo-fixes
Open

[REF] Barueri Refactor#93
marcelsavegnago wants to merge 4 commits intoerpbrasil:masterfrom
Escodoo:master-escodoo-fixes

Conversation

@marcelsavegnago
Copy link
Contributor

@marcelsavegnago marcelsavegnago commented Dec 3, 2025

This pull request makes significant updates to the Barueri NFSe provider integration, focusing on improving service coverage, request/response handling, and code consistency. The main changes include adding support for batch download operations, refactoring request preparation and response analysis, and updating the process flow for synchronous document submission.

Barueri provider improvements and new features:

  • Added support for the baixar_lote_rps (batch download) operation, including the corresponding service registration and request preparation method (_prepara_baixar_lote_rps). Also added the baixar_lote_rps method to handle posting the request and receiving the response. [1] [2] [3]
  • Refactored request preparation methods to use updated data structures and parameters, aligning with the Barueri provider's latest requirements (e.g., using NFeLoteStatusArquivo.NFeLoteStatusArquivo instead of older request structures).

Response handling and analysis:

  • Rewrote the analisa_retorno_consulta method to handle the new response format, providing clearer status messages and error handling based on the Barueri provider's codes and messages.
  • Updated the _verifica_resposta_envio_sucesso and _edoc_situacao_em_processamento methods to use the new response attributes (ProtocoloRemessa and ListaNfeArquivosRPS.SituacaoArq).

Process flow and infrastructure:

  • Modified the main document processing flow (processar_documento) to include receipt querying and pass the receipt process to monta_processo for synchronous submissions, ensuring complete process information is available.
  • Refactored the _post and analisar_retorno methods to streamline SOAP request/response handling, making the code more maintainable and consistent with other providers.

@marcelsavegnago marcelsavegnago marked this pull request as draft December 3, 2025 23:16
@CristianoMafraJunior CristianoMafraJunior force-pushed the master-escodoo-fixes branch 2 times, most recently from 609369e to 6fbd3e3 Compare December 5, 2025 12:47
@marcelsavegnago marcelsavegnago force-pushed the master-escodoo-fixes branch 2 times, most recently from 4cb1a84 to ac9e01f Compare December 12, 2025 06:06
@marcelsavegnago marcelsavegnago marked this pull request as ready for review December 26, 2025 16:45
@marcelsavegnago marcelsavegnago changed the title [WIP] fixes and others [REF] Barueri Refactor Dec 26, 2025
@marcelsavegnago
Copy link
Contributor Author

ping @mileo @antoniospneto @rvalyi @CristianoMafraJunior

Aproveitamos a mudança de layout de barueri e ajustamos totalmente o codigo para de fato funcionar (a principio barueri em termos gerais foi uma copia do mal feita do ginfes e não estava funcionando.. erpbrasil.edoc, nfselib.barueri e o modulo do odoo l10n_br_nfse_barueri)

@marcelsavegnago
Copy link
Contributor Author

Pessoal, nao parei para ver os erros do build.. mas se for o "normal" do momento ai nem vou olhar mesmo hehehe

@mileo
Copy link
Member

mileo commented Jan 9, 2026

@ygcarvalh pode publicar a lib ta na sua conta. E aproveita e adiciona eu e o @marcelsavegnago

https://github.com/erpbrasil/erpbrasil.base/wiki

Eu já dei push nas tags, vc não vai precisar fazer tudo que ta descrito acima, somente:

Conferir se os commits feitos alteraram as coisas corretas
python setup.py clean --all sdist bdist_wheel
twine upload --skip-existing dist/.whl dist/.gz

@marcelsavegnago
Copy link
Contributor Author

@ygcarvalh pode publicar a lib ta na sua conta. E aproveita e adiciona eu e o @marcelsavegnago

https://github.com/erpbrasil/erpbrasil.base/wiki

Eu já dei push nas tags, vc não vai precisar fazer tudo que ta descrito acima, somente:

Conferir se os commits feitos alteraram as coisas corretas
python setup.py clean --all sdist bdist_wheel
twine upload --skip-existing dist/.whl dist/.gz

a que está no nome do Ygor é a nfselib.barueri.. certo ?

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

Successfully merging this pull request may close these issues.

3 participants