Se modifico el task de coves
This commit is contained in:
@@ -129,7 +129,6 @@ def extract_acuse_documento_from_soap(soap_response_text): # Testeado
|
||||
logger.error(f"Error extrayendo acuseDocumento: {e}")
|
||||
return None
|
||||
|
||||
|
||||
def extract_pdf_bytes_from_xml(xml_path):
|
||||
"""
|
||||
Igual que extract_pdf_bytes_from_xml_content pero recibe una ruta de archivo.
|
||||
@@ -309,13 +308,11 @@ async def get_soap_pedimento_completo(credenciales, response_service, soap_contr
|
||||
organizacion=response_service['organizacion'],
|
||||
pedimento=response_service['pedimento']['id'],
|
||||
file_name=_file_name,
|
||||
document_type=2,
|
||||
|
||||
document_type=2,
|
||||
)
|
||||
|
||||
data['organizacion'] = response_service['organizacion']
|
||||
data['id'] = response_service['pedimento']['id']
|
||||
data['fuente'] = 2
|
||||
|
||||
return {
|
||||
"servicio": response_service,
|
||||
@@ -970,6 +967,8 @@ async def get_soap_cove(credenciales, response_service, soap_controller, cove, i
|
||||
cove=cove['numero_cove']
|
||||
)
|
||||
|
||||
|
||||
|
||||
### >>> AQUÍ SE AÑADE EL LOGGER.DEBUG <<< ###
|
||||
logger.debug(f"XML SOAP generado: {soap_xml}") # 👈 Registra el XML completo
|
||||
|
||||
@@ -989,6 +988,8 @@ async def get_soap_cove(credenciales, response_service, soap_controller, cove, i
|
||||
headers=soap_headers
|
||||
)
|
||||
|
||||
|
||||
|
||||
if (soap_response) and (not soap_error(soap_response)):
|
||||
logger.info(f"Petición SOAP exitosa - Status: {soap_response.status_code}")
|
||||
|
||||
@@ -999,14 +1000,14 @@ async def get_soap_cove(credenciales, response_service, soap_controller, cove, i
|
||||
tipo_operacion = response_service['pedimento'].get('tipo_operacion', 'N/A')
|
||||
pedimento = response_service['pedimento'].get('pedimento', 'N/A')
|
||||
|
||||
_file_name = f"vu_COVE_{remesas}{no_partidas}{tipo_operacion}_{aduana}_{patente}_{pedimento}_{idx}.xml"
|
||||
_file_name = f"vu_COVE_{remesas}{no_partidas}{tipo_operacion}_{aduana}_{patente}_{pedimento}_{cove['numero_cove']}.xml"
|
||||
|
||||
document_response = await rest_controller.post_document(
|
||||
soap_response=soap_response,
|
||||
organizacion=response_service['organizacion'],
|
||||
pedimento=response_service['pedimento']['id'],
|
||||
file_name=_file_name,
|
||||
document_type=8
|
||||
document_type=8,
|
||||
)
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user