The limits on the issue date
The AEAT validation document sets three limits for FechaExpedicionFactura, the issue date:
- It cannot be later than the current date. If it is, the code is 1112.
- It cannot be earlier than 28/10/2024, the date the VERI*FACTU ministerial order came into force. Code 1152.
- It can only be earlier than the operation date with regime keys 14 or 15. Code 1146.
On top of those, 1133 forbids issue dates more than twenty years old, and there are two format codes: 1145, for a record, and 4106, which sits in the header and therefore rejects the whole request. 1105 is the generic one: El valor del campo FechaExpedicionFactura es incorrecto., the issue date value is wrong.

The operation date
FechaOperacion, the operation date, is optional and is used when the operation does not match the invoice date. Its limits, according to the AEAT:
| Code | Rule |
|---|---|
| 1125 | It cannot go beyond the year after the current date. |
| 1134 | It cannot be more than twenty years old. |
| 1173 | It can only be later than today with regime keys 14 or 15. |
| 1147 | With key 14, it is mandatory and later than the issue date. |
Which dates Odoo sends
The module takes the invoice date in Odoo as the issue date and, if the invoice had none, today's date. As operation date it uses the same one, and the submission only includes FechaOperacion when it differs from the issue date. In practice, an Odoo invoice goes out without FechaOperacion, so the four codes in the table should not appear with a submission from the module. Besides, the module always declares regime key 01, so the exceptions for keys 14 and 15 do not apply to it.

The two cases you do see
An invoice dated in the future. Odoo lets you post an invoice dated after today, for example to have it ready. VERI*FACTU does not: the record arrives with an issue date later than the AEAT's and is rejected with 1112. The solution is to post it on the right day, with that day's date.
An invoice from before VERI*FACTU. If you post a late invoice in Odoo dated before 28 October 2024, the record is rejected with 1152. Invoices from before that date are not part of VERI*FACTU.
What happens to the rejected invoice
The queue tries to send it up to six times, with waits from 2 minutes to 12 hours, and leaves it in Dead Letter. The retries carry the same date, because the record keeps the one it had when it was posted, so they will not work. Changing the invoice date in Odoo does not change the record already created either.
Write to comercial@flexigobe.com with the invoice number and we will help you close it. And for the next ones, check the date before posting: it is the only thing that is easy to change.
The codes on this page, with the AEAT's text
Each code with its literal text, in Spanish, as the AEAT's error list gives it:
| Code | AEAT text (Spanish) |
|---|---|
| 1105 | El valor del campo FechaExpedicionFactura es incorrecto. |
| 1112 | El campo FechaExpedicionFactura es superior a la fecha actual. |
| 1133 | El valor del campo FechaExpedicionFactura no debe ser inferior a la fecha actual menos veinte años. |
| 1145 | Formato de fecha incorrecto. |
| 1152 | La fecha de expedición no puede ser inferior al 28 de octubre de 2024. |
| 4106 | El formato de fecha es incorrecto. |
| 1125 | El valor del campo FechaOperacion tiene una fecha superior a la permitida. |
| 1134 | El valor del campo FechaOperacion no debe ser inferior a la fecha actual menos veinte años. |
| 1146 | Sólo se permite que la fecha de expedicion de la factura sea anterior a la fecha operación si los detalles del desglose son ClaveRegimen 14 o 15 e Impuesto 01, 03 o vacío. |
| 1147 | Si ClaveRegimen es 14, FechaOperacion es obligatoria y debe ser posterior a la FechaExpedicionFactura. |
| 1173 | Sólo se permite que la fecha de operación sea superior a la fecha actual si los detalles del desglose son ClaveRegimen 14 o 15 e Impuesto IVA(01) o IGIC(03) o vacío. |
Is 4106 about an invoice too?
Not necessarily. It is a date format error in the header, which is why it rejects the whole submission. A submission from the module carries no dates in the header, so if you see it, send us the answer.
Keep reading
Checked in the module's source code (version 20.0) and the linked sources
Sources
- www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validacione
- Module source code: flexigo_spain_verifactu 20.0 (aa2ea3d2): models/verifactu_cadena.py
- Module source code: flexigo_spain_verifactu 20.0 (aa2ea3d2): models/verifactu_aeat_client.py
- Module source code: flexigo_spain_verifactu 20.0 (aa2ea3d2): models/verifactu_cola_envio.py
- Module source code: flexigo_spain_verifactu 20.0 (aa2ea3d2): models/verifactu_registro.py
- prewww2.aeat.es/static_files/common/internet/dep/aplicaciones/es/aeat/tikeV1.0/cont/ws/err
