diff --git a/l10n_br_nfe/models/document.py b/l10n_br_nfe/models/document.py index f7d961939647..2a7c7582ac8b 100644 --- a/l10n_br_nfe/models/document.py +++ b/l10n_br_nfe/models/document.py @@ -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: diff --git a/l10n_br_nfe/views/nfe_document_view.xml b/l10n_br_nfe/views/nfe_document_view.xml index cc31ef4fe28b..257040aaf6af 100644 --- a/l10n_br_nfe/views/nfe_document_view.xml +++ b/l10n_br_nfe/views/nfe_document_view.xml @@ -144,6 +144,7 @@ position="after" > +