Closed moylop260 closed 7 years ago
Please, consider add the tests with this case
Where did you see this error?
Since July that value is mandatory not optional.
What version of xsd are you seeing for July?
In the cfdv32.xsd searching NumCtaPago
show:
Atributo Opcional para incorporar al menos los cuatro últimos digitos del número de cuenta con la que se realizó el pago.
You can test it in the last build of runbot for 10.0 http://runbot.vauxoo.com/runbot/56/10.0
Según éste reporte es cómo tu indicas.
http://elconta.com/2016/07/18/cambios-metodos-de-pago-cfdi/
Yo no lo había validado por mis propios ojos.
Entiendo que todo el tema de los cuatro dígiltos es nuevo.
El error que estás mencionando lo revisaré en la librería.
@nhomar
No es requerido, Pero en la v9 se completaba con "0000", si venía vació, por la cuestión que no querías agregar el if para verificar que solo si viene valor en el atributo lo coloque.
Saludos
Para campos que no son requeridos y que vienen vacíos, no estoy seguro si es una buena idea dejar un default decidido por nosotros o eliminar el campo... 🤔
2016-10-24 13:32 GMT-05:00 Luis Ernesto Torres Macías < notifications@github.com>:
No es requerido, Pero en la v9 https://github.com/Vauxoo/mexico/blob/9.0/oml/models/account_invoice.py#L682 se completaba con "0000", si venía vació, por la cuestión que no querías agregar el if para verificar que solo si viene valor en el atributo lo coloque.
copiado.
Nota: ¿por qué está comportandose diferentre en v10?
Nhomar Hernandez CEO Vauxoo. Site: http://vauxoo.com Twitter: @nhomar Blog: http://nhomar.com Github User: https://github.com/nhomar Odoo Gold Partner Skype: nhomar00 (Envia mail previo no lo superviso siempre). HangOut: nhomar@vauxoo.com Móvil Venezuela: +58 4144110269 Móvil México: +52 1 4773933942
@nhomar
Porque anteriormente se tenía un compute, y si no venía el valor se colocaba "0000"
Ahora se cambió a related, y si viene vacío en el XML coloca "NA".
Ese campo en el XSD es de len 4, entonces aquí se presenta el error.
Lo que puede ser que se agregue el if en el template de la librería, que solo cuando venga ese campo se coloque el nodo, ya que este no es requerido.
Saludos
Using empty value from invoice for
account_payment_id
fieldI saw the following error:
Element '{http://www.sat.gob.mx/cfd/3}Comprobante', attribute 'NumCtaPago': [facet 'minLength'] The value 'NA' has a length of '2'; this underruns the allowed minimum length of '4'.
FYI this field is optional then we should allow a empty value here.