diff --git a/nfselib/ginfes/v3_01/cabecalho.py b/nfselib/ginfes/v3_01/cabecalho.py index 54c42fb..6d81826 100644 --- a/nfselib/ginfes/v3_01/cabecalho.py +++ b/nfselib/ginfes/v3_01/cabecalho.py @@ -110,11 +110,11 @@ def parsexmlstring_(instring, parser=None, **kwargs): # try: - from generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_ + from .generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_ except ImportError: GenerateDSNamespaceDefs_ = {} try: - from generatedsnamespaces import GenerateDSNamespaceTypePrefixes as GenerateDSNamespaceTypePrefixes_ + from .generatedsnamespaces import GenerateDSNamespaceTypePrefixes as GenerateDSNamespaceTypePrefixes_ except ImportError: GenerateDSNamespaceTypePrefixes_ = {} @@ -967,9 +967,9 @@ def __init__(self, versao=None, versaoDados=None, gds_collector_=None, **kwargs_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None + self.ns_prefix_ = GenerateDSNamespaceTypePrefixes_.get('cabecalho') self.versao = _cast(None, versao) - self.versao_nsprefix_ = None + self.versao_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('cabecalho') self.versaoDados = versaoDados self.validate_tsVersao(self.versaoDados) self.versaoDados_nsprefix_ = None diff --git a/nfselib/ginfes/v3_01/generatedsnamespaces.py b/nfselib/ginfes/v3_01/generatedsnamespaces.py index 69640c8..2d69c04 100644 --- a/nfselib/ginfes/v3_01/generatedsnamespaces.py +++ b/nfselib/ginfes/v3_01/generatedsnamespaces.py @@ -4,5 +4,19 @@ "EnviarLoteRpsEnvio": 'xmlns="http://www.ginfes.com.br/servico_enviar_lote_rps_envio_v03.xsd" xmlns:tipos="http://www.ginfes.com.br/tipos_v03.xsd"', "ListaRpsType": 'xmlns="http://www.ginfes.com.br/tipos_v03.xsd"', "ConsultarSituacaoLoteRpsEnvio": 'xmlns="http://www.ginfes.com.br/servico_consultar_situacao_lote_rps_envio_v03.xsd" xmlns:tipos="http://www.ginfes.com.br/tipos_v03.xsd"', + "ConsultarNfseRpsEnvio": 'xmlns="http://www.ginfes.com.br/servico_consultar_nfse_rps_envio_v03.xsd" xmlns:tipos="http://www.ginfes.com.br/tipos_v03.xsd"', + "CancelarNfseEnvio": 'xmlns:p="http://www.ginfes.com.br/servico_cancelar_nfse_envio_v03.xsd" xmlns:p1="http://www.ginfes.com.br/tipos_v03.xsd"', + # "tcPedidoCancelamento": 'xmlns=""', "cabecalho": 'xmlns:ns2="http://www.ginfes.com.br/cabecalho_v03.xsd"', } + +GenerateDSNamespaceTypePrefixes = { + "tcLoteRps": 'tipos', + "tcIdentificacaoPrestador": 'tipos', + "tcIdentificacaoRps": 'tipos', + "tcIdentificacaoNfse": 'p1', + "tcInfPedidoCancelamento": 'p1', + "tcPedidoCancelamento": 'p1', + "CancelarNfseEnvio": 'p', + "cabecalho": 'ns2' +} \ No newline at end of file diff --git a/nfselib/ginfes/v3_01/servico_cancelar_nfse_envio.py b/nfselib/ginfes/v3_01/servico_cancelar_nfse_envio.py index 7c4a9af..d920ad4 100644 --- a/nfselib/ginfes/v3_01/servico_cancelar_nfse_envio.py +++ b/nfselib/ginfes/v3_01/servico_cancelar_nfse_envio.py @@ -110,11 +110,11 @@ def parsexmlstring_(instring, parser=None, **kwargs): # try: - from generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_ + from .generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_ except ImportError: GenerateDSNamespaceDefs_ = {} try: - from generatedsnamespaces import GenerateDSNamespaceTypePrefixes as GenerateDSNamespaceTypePrefixes_ + from .generatedsnamespaces import GenerateDSNamespaceTypePrefixes as GenerateDSNamespaceTypePrefixes_ except ImportError: GenerateDSNamespaceTypePrefixes_ = {} @@ -967,7 +967,7 @@ def __init__(self, Pedido=None, Signature=None, gds_collector_=None, **kwargs_): self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None + self.ns_prefix_ = GenerateDSNamespaceTypePrefixes_.get('CancelarNfseEnvio') self.Pedido = Pedido self.Pedido_nsprefix_ = None self.Signature = Signature @@ -3932,19 +3932,19 @@ def __init__(self, Numero=None, Cnpj=None, InscricaoMunicipal=None, CodigoMunici self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None + self.ns_prefix_ = GenerateDSNamespaceTypePrefixes_.get('tcIdentificacaoNfse') self.Numero = Numero self.validate_tsNumeroNfse(self.Numero) - self.Numero_nsprefix_ = None + self.Numero_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcIdentificacaoNfse') self.Cnpj = Cnpj self.validate_tsCnpj(self.Cnpj) - self.Cnpj_nsprefix_ = None + self.Cnpj_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcIdentificacaoNfse') self.InscricaoMunicipal = InscricaoMunicipal self.validate_tsInscricaoMunicipal(self.InscricaoMunicipal) - self.InscricaoMunicipal_nsprefix_ = None + self.InscricaoMunicipal_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcIdentificacaoNfse') self.CodigoMunicipio = CodigoMunicipio self.validate_tsCodigoMunicipioIbge(self.CodigoMunicipio) - self.CodigoMunicipio_nsprefix_ = None + self.CodigoMunicipio_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcIdentificacaoNfse') def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -4724,14 +4724,14 @@ def __init__(self, Id=None, IdentificacaoNfse=None, CodigoCancelamento=None, gds self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None + self.ns_prefix_ = GenerateDSNamespaceTypePrefixes_.get('tcInfPedidoCancelamento') self.Id = _cast(None, Id) self.Id_nsprefix_ = None self.IdentificacaoNfse = IdentificacaoNfse self.IdentificacaoNfse_nsprefix_ = None self.CodigoCancelamento = CodigoCancelamento self.validate_tsCodigoCancelamentoNfse(self.CodigoCancelamento) - self.CodigoCancelamento_nsprefix_ = None + self.CodigoCancelamento_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcInfPedidoCancelamento') def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( diff --git a/nfselib/ginfes/v3_01/servico_consultar_lote_rps_envio.py b/nfselib/ginfes/v3_01/servico_consultar_lote_rps_envio.py index 8b7f880..3270130 100644 --- a/nfselib/ginfes/v3_01/servico_consultar_lote_rps_envio.py +++ b/nfselib/ginfes/v3_01/servico_consultar_lote_rps_envio.py @@ -110,11 +110,11 @@ def parsexmlstring_(instring, parser=None, **kwargs): # try: - from generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_ + from .generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_ except ImportError: GenerateDSNamespaceDefs_ = {} try: - from generatedsnamespaces import GenerateDSNamespaceTypePrefixes as GenerateDSNamespaceTypePrefixes_ + from .generatedsnamespaces import GenerateDSNamespaceTypePrefixes as GenerateDSNamespaceTypePrefixes_ except ImportError: GenerateDSNamespaceTypePrefixes_ = {} @@ -5023,10 +5023,10 @@ def __init__(self, Cnpj=None, InscricaoMunicipal=None, gds_collector_=None, **kw self.ns_prefix_ = None self.Cnpj = Cnpj self.validate_tsCnpj(self.Cnpj) - self.Cnpj_nsprefix_ = None + self.Cnpj_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcIdentificacaoPrestador') self.InscricaoMunicipal = InscricaoMunicipal self.validate_tsInscricaoMunicipal(self.InscricaoMunicipal) - self.InscricaoMunicipal_nsprefix_ = None + self.InscricaoMunicipal_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcIdentificacaoPrestador') def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( diff --git a/nfselib/ginfes/v3_01/servico_consultar_nfse_rps_envio.py b/nfselib/ginfes/v3_01/servico_consultar_nfse_rps_envio.py index 185f835..2313069 100644 --- a/nfselib/ginfes/v3_01/servico_consultar_nfse_rps_envio.py +++ b/nfselib/ginfes/v3_01/servico_consultar_nfse_rps_envio.py @@ -110,11 +110,11 @@ def parsexmlstring_(instring, parser=None, **kwargs): # try: - from generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_ + from .generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_ except ImportError: GenerateDSNamespaceDefs_ = {} try: - from generatedsnamespaces import GenerateDSNamespaceTypePrefixes as GenerateDSNamespaceTypePrefixes_ + from .generatedsnamespaces import GenerateDSNamespaceTypePrefixes as GenerateDSNamespaceTypePrefixes_ except ImportError: GenerateDSNamespaceTypePrefixes_ = {} @@ -1801,13 +1801,13 @@ def __init__(self, Numero=None, Serie=None, Tipo=None, gds_collector_=None, **kw self.ns_prefix_ = None self.Numero = Numero self.validate_tsNumeroRps(self.Numero) - self.Numero_nsprefix_ = None + self.Numero_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcIdentificacaoRps') self.Serie = Serie self.validate_tsSerieRps(self.Serie) - self.Serie_nsprefix_ = None + self.Serie_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcIdentificacaoRps') self.Tipo = Tipo self.validate_tsTipoRps(self.Tipo) - self.Tipo_nsprefix_ = None + self.Tipo_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcIdentificacaoRps') def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -1973,10 +1973,10 @@ def __init__(self, Cnpj=None, InscricaoMunicipal=None, gds_collector_=None, **kw self.ns_prefix_ = None self.Cnpj = Cnpj self.validate_tsCnpj(self.Cnpj) - self.Cnpj_nsprefix_ = None + self.Cnpj_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcIdentificacaoPrestador') self.InscricaoMunicipal = InscricaoMunicipal self.validate_tsInscricaoMunicipal(self.InscricaoMunicipal) - self.InscricaoMunicipal_nsprefix_ = None + self.InscricaoMunicipal_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcIdentificacaoPrestador') def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( diff --git a/nfselib/ginfes/v3_01/servico_consultar_situacao_lote_rps_envio.py b/nfselib/ginfes/v3_01/servico_consultar_situacao_lote_rps_envio.py index 0fdd4b8..2319ce3 100644 --- a/nfselib/ginfes/v3_01/servico_consultar_situacao_lote_rps_envio.py +++ b/nfselib/ginfes/v3_01/servico_consultar_situacao_lote_rps_envio.py @@ -110,11 +110,11 @@ def parsexmlstring_(instring, parser=None, **kwargs): # try: - from generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_ + from .generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_ except ImportError: GenerateDSNamespaceDefs_ = {} try: - from generatedsnamespaces import GenerateDSNamespaceTypePrefixes as GenerateDSNamespaceTypePrefixes_ + from .generatedsnamespaces import GenerateDSNamespaceTypePrefixes as GenerateDSNamespaceTypePrefixes_ except ImportError: GenerateDSNamespaceTypePrefixes_ = {} @@ -2011,10 +2011,10 @@ def __init__(self, Cnpj=None, InscricaoMunicipal=None, gds_collector_=None, **kw self.ns_prefix_ = None self.Cnpj = Cnpj self.validate_tsCnpj(self.Cnpj) - self.Cnpj_nsprefix_ = None + self.Cnpj_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcIdentificacaoPrestador') self.InscricaoMunicipal = InscricaoMunicipal self.validate_tsInscricaoMunicipal(self.InscricaoMunicipal) - self.InscricaoMunicipal_nsprefix_ = None + self.InscricaoMunicipal_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcIdentificacaoPrestador') def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( diff --git a/nfselib/ginfes/v3_01/servico_enviar_lote_rps_envio.py b/nfselib/ginfes/v3_01/servico_enviar_lote_rps_envio.py index 44b8d73..6cddcb7 100644 --- a/nfselib/ginfes/v3_01/servico_enviar_lote_rps_envio.py +++ b/nfselib/ginfes/v3_01/servico_enviar_lote_rps_envio.py @@ -110,11 +110,11 @@ def parsexmlstring_(instring, parser=None, **kwargs): # try: - from generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_ + from .generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_ except ImportError: GenerateDSNamespaceDefs_ = {} try: - from generatedsnamespaces import GenerateDSNamespaceTypePrefixes as GenerateDSNamespaceTypePrefixes_ + from .generatedsnamespaces import GenerateDSNamespaceTypePrefixes as GenerateDSNamespaceTypePrefixes_ except ImportError: GenerateDSNamespaceTypePrefixes_ = {} @@ -1961,10 +1961,10 @@ def __init__(self, Cnpj=None, InscricaoMunicipal=None, gds_collector_=None, **kw self.ns_prefix_ = None self.Cnpj = Cnpj self.validate_tsCnpj(self.Cnpj) - self.Cnpj_nsprefix_ = None + self.Cnpj_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcIdentificacaoPrestador') self.InscricaoMunicipal = InscricaoMunicipal self.validate_tsInscricaoMunicipal(self.InscricaoMunicipal) - self.InscricaoMunicipal_nsprefix_ = None + self.InscricaoMunicipal_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcIdentificacaoPrestador') def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -6052,16 +6052,16 @@ def __init__(self, Id=None, NumeroLote=None, Cnpj=None, InscricaoMunicipal=None, self.Id_nsprefix_ = None self.NumeroLote = NumeroLote self.validate_tsNumeroLote(self.NumeroLote) - self.NumeroLote_nsprefix_ = None + self.NumeroLote_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcLoteRps') self.Cnpj = Cnpj self.validate_tsCnpj(self.Cnpj) - self.Cnpj_nsprefix_ = None + self.Cnpj_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcLoteRps') self.InscricaoMunicipal = InscricaoMunicipal self.validate_tsInscricaoMunicipal(self.InscricaoMunicipal) - self.InscricaoMunicipal_nsprefix_ = None + self.InscricaoMunicipal_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcLoteRps') self.QuantidadeRps = QuantidadeRps self.validate_tsQuantidadeRps(self.QuantidadeRps) - self.QuantidadeRps_nsprefix_ = None + self.QuantidadeRps_nsprefix_ = GenerateDSNamespaceTypePrefixes_.get('tcLoteRps') self.ListaRps = ListaRps self.ListaRps_nsprefix_ = None def factory(*args_, **kwargs_):