Skip to content

Commit

Permalink
[IMP] l10n_br_nfe: enable sefaz contingency
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniospneto committed May 8, 2024
1 parent 563707b commit 615ce7b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions l10n_br_nfe/models/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -868,11 +868,19 @@ def _processador(self):
certificado = self.env.company._get_br_ecertificate()
session = Session()
session.verify = False

# contingency check
# tpEmis 6: SVC-AN (SEFAZ Virtual de Contingência do AN)
# tpEmis 7: SVC-RS (SEFAZ Virtual de Contingência do RS)
if self.nfe40_tpEmis in ["6", "7"]:
contingencia = True

params = {
"transmissao": TransmissaoSOAP(certificado, session),
"uf": self.company_id.state_id.ibge_code,
"versao": self.nfe_version,
"ambiente": self.nfe_environment,
"contingencia": contingencia,
}

if self.document_type == MODELO_FISCAL_NFCE:
Expand Down
1 change: 1 addition & 0 deletions l10n_br_nfe/views/nfe_document_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@
position="after"
>
<field name="nfe_environment" />
<field name="nfe_transmission" />
</xpath>
</field>
</record>
Expand Down

0 comments on commit 615ce7b

Please sign in to comment.