Skip to content

Commit

Permalink
Merge pull request #79 from akretion/edoc-adapter
Browse files Browse the repository at this point in the history
more erpbrasil.edoc adapters
  • Loading branch information
rvalyi committed Jun 27, 2023
2 parents 9f42442 + 74cc2c4 commit f1e1723
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions nfelib/nfe/ws/edoc_legacy.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
# Copyright 2018 - TODAY Luis Felipe Mileo - KMEE INFORMATICA LTDA
# Copyright 2023 - TODAY Akretion - Raphaël Valyi <raphael.valyi@akretion.com>

from erpbrasil.assinatura.assinatura import Assinatura
from dataclasses import is_dataclass

from erpbrasil.assinatura.assinatura import Assinatura

try:
from erpbrasil.edoc.edoc import DocumentoEletronico
from erpbrasil.edoc.resposta import RetornoSoap, analisar_retorno_raw
from erpbrasil.edoc.mde import MDe
from erpbrasil.edoc.mdfe import MDFe
from erpbrasil.edoc.nfce import NFCe
from erpbrasil.edoc.nfe import NFe
from erpbrasil.edoc.resposta import RetornoSoap, analisar_retorno_raw


except ImportError:
raise RuntimeError(
"You need to install the erpbrasil.edoc package to use this legacy webservice layer."
)

import re

from lxml import etree
from lxml.etree import _Element
import re
from xsdata.formats.dataclass.context import XmlContext
from xsdata.formats.dataclass.parsers import XmlParser
from xsdata.formats.dataclass.serializers import XmlSerializer
Expand Down Expand Up @@ -90,3 +96,15 @@ def assina_raiz(self, raiz, id, getchildren=False):

class NFeAdapter(DocumentoElectronicoAdapter, NFe):
pass


class NFCeAdapter(DocumentoElectronicoAdapter, NFCe):
pass


class MDeAdapter(DocumentoElectronicoAdapter, MDe):
pass


class MDFeAdapter(DocumentoElectronicoAdapter, MDFe):
pass

0 comments on commit f1e1723

Please sign in to comment.