-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WSFEv1: Agrego los cambios de FCE al branch py3k #65
Conversation
@@ -13,7 +13,7 @@ | |||
"Módulo de Intefase para archivos de texto (exportación version 1)" | |||
|
|||
__author__ = "Mariano Reingart ([email protected])" | |||
__copyright__ = "Copyright (C) 2011 Mariano Reingart" | |||
__copyright__ = "Copyright (C) 2019 Mariano Reingart" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No sería bueno pone run xyz - 2019?
xyz = desde que año.
:-)
recex1.py
Outdated
@@ -465,6 +465,17 @@ def depurar_xml(client): | |||
print(ws.ErrMsg) | |||
sys.exit(0) | |||
|
|||
if '/monctz' in sys.argv: | |||
i = sys.argv.index("/monctz") | |||
if i+1<len(sys.argv): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
que tal:
if i+1<len(sys.argv): | |
if i+1 < len(sys.argv): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
De hecho, habría que correr pyflakes
o similar antes de pushear los commits, asi saltan todas estas cuestiones de estilo de PEP8
Ver tambien autopep8
y/o black para corregir el código automágicamente.
Más adelante, estas herramientas se deberían correr automáticamente en el proceso de Integración Continua, tanto para revisar el código y/o corregirlo automáticamente (travis o lo que se decida instalar)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gracias por las sugerencias .
Agrego los métodos a tener en cuenta.
@@ -11,26 +11,27 @@ | |||
# for more details. | |||
|
|||
"""M�dulo para obtener CAE/CAEA, c�digo de autorizaci�n electr�nico webservice | |||
WSFEv1 de AFIP (Factura Electr�nica Nacional - Proyecto Version 1 - 2.10) | |||
WSFEv1 de AFIP (Factura Electr�nica Nacional - Proyecto Version 1 - 2.13) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Habría alguna chance que a la versión la saque de algun solo lugar? por ejemplo un version.py?
Así de esa manera no hay que estar modificando los archivos
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, esa versión es de AFIP; a veces viene en el WSDL del webservice, pero en general hay que revisar la especificación técnica de cada endpoint: http://www.afip.gov.ar/ws
wsfev1.py
Outdated
# agregar la factura creada internamente para solicitud m�ltiple: | ||
if "--multiple" in sys.argv: | ||
wsfev1.AgregarFacturaX() | ||
|
||
import time | ||
# import time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Que tal eliminar el comentario?
Hola @eamanu , gracias por las sugerencias. |
* QR * CodAutorizacion * Serializacion fecha (JSON) * ConfigParser
* Metodo AgregarCmpAsoc(tipo, pto_vta, nro, cuit, fecha) * Metodo AgregarOpcional(opcional_id, valor) * Ajuste fecha_venc_pago
wsbfev1.py
Outdated
|
||
import datetime | ||
import decimal | ||
import os | ||
import sys | ||
from .utils import inicializar_y_capturar_excepciones, BaseWS, get_install_dir | ||
from utils import inicializar_y_capturar_excepciones, BaseWS, get_install_dir |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cuidado: en Python3 todos los imports deberían ser absolutos (posiblemente se debería agregar pyafipws.
como prefijo para evitar ambiguedades)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hola @reingart , gracias lo tengo en cuenta.
wsbfev1.py
Outdated
@@ -456,7 +489,7 @@ def p_assert_eq(a, b): | |||
# Setear token y sing de autorizaci�n (pasos previos) | |||
|
|||
# obteniendo el TA para pruebas | |||
from .wsaa import WSAA | |||
from wsaa import WSAA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idem: usar import absoluto o relativo al paquete
recex1.py
Outdated
@@ -465,6 +465,17 @@ def depurar_xml(client): | |||
print(ws.ErrMsg) | |||
sys.exit(0) | |||
|
|||
if '/monctz' in sys.argv: | |||
i = sys.argv.index("/monctz") | |||
if i+1<len(sys.argv): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
De hecho, habría que correr pyflakes
o similar antes de pushear los commits, asi saltan todas estas cuestiones de estilo de PEP8
Ver tambien autopep8
y/o black para corregir el código automágicamente.
Más adelante, estas herramientas se deberían correr automáticamente en el proceso de Integración Continua, tanto para revisar el código y/o corregirlo automáticamente (travis o lo que se decida instalar)
#62 Hola Mariano hice los cambios de Factura de crédito electrónica