Walter, te copio y pego lo que creo que modifiqué, pero me puede faltar algo.
Mariano, si te parece que está bueno, puedo revisar bien todo el proyecto y comitearlo para que lo evalues de agregar
En rece1.py línea 36:
#MODIFICADO PARA SAAS ARGENTINA
if len(sys.argv)>1 and sys.argv[1].endswith(".ini"):
CONFIG_FILE = sys.argv[1]
print "USING", CONFIG_FILE
else:
CONFIG_FILE = "rece.ini"
En rece1.py línea 244
def depurar_xml(client):
fecha = time.strftime("%Y%m%d%H%M%S")
f=open(wsfev1_xml_dir+"request-%s.xml" % fecha,"w") #MODIFICADO PARA SAAS ARGENTINA
f.write(client.xml_request)
f.close()
f=open(wsfev1_xml_dir+"response-%s.xml" % fecha,"w") #MODIFICADO PARA SAAS ARGENTINA
f.write(client.xml_response)
f.close()
En rece1.py línea 285
TA = config.get('WSAA','TA') #MODIFICADO PARA SAAS ARGENTINA
Por cada cuit tengo un archivo 20123456783.ini (suponiendo que el cuit sea 20123456783)
[WSAA]
CERT=/path/to/wsfe/20123456783.crt
PRIVATEKEY=/path/to/wsfe/20123456783.key
TA=/path/to/wsfe/20123456783_TA.xml
[WSFEv1]
CUIT=20123456783
ENTRADA=/path/to/wsfe/20123456783.entrada
SALIDA=/path/to/wsfe/20123456783.salida
XML_DIR=/sites/saasargentina/customer/saasargentina/empresas/xml/
En wsaa.py línea 198:
for filename in (crt, key):
if not os.access(filename,os.R_OK):
raise RuntimeError("Imposible abrir %s\n" % filename)
# creo el nombre para el archivo del TA (según credenciales y ws)
# fn = "TA-%s.xml" % hashlib.md5(service + crt + key).hexdigest() MODIFICADO POR SAAS ARGENTINA
fn = TA
if cache:
fn = os.path.join(cache, fn)
else:
fn = os.path.join(self.InstallDir, "cache", fn)
Espero que te sirva de guía o como idea.
Saludos.