Skip to content

Commit

Permalink
Merge pull request #83 from Escodoo/feature/cte-generate_cteProc_xml
Browse files Browse the repository at this point in the history
[feature/cte][IMP] cte: generate cteProc xml file
  • Loading branch information
marcelsavegnago authored Jul 19, 2024
2 parents 70ceb70 + dde727b commit eeae630
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/erpbrasil/edoc/cte.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,20 @@ def monta_qrcode(self, chave):
f"{self._get_ws_endpoint(QR_CODE_URL)}?chCTe={chave}&tpAmb={self.ambiente}"
)

def monta_cte_proc(self, doc, prot):
"""
Constrói e retorna o XML do processo da CT-e,
incorporando a CT-e com o seu protocolo de autorização.
"""
proc = etree.Element(
f"{{{self._namespace}}}cteProc",
versao=self.versao,
nsmap={None: self._namespace},
)
proc.append(doc)
proc.append(prot)
return etree.tostring(proc)


class TransmissaoCTE(TransmissaoSOAP):
def interpretar_mensagem(self, mensagem, **kwargs):
Expand Down

0 comments on commit eeae630

Please sign in to comment.