The two codes
- 4113
- «El XML no cumple con el esquema: se ha superado el límite permitido de registros para el bloque.» A block of the XML has more repetitions than it allows.
- 4114
- «El XML no cumple con el esquema: se ha superado el límite máximo permitido de facturas a registrar.» The request carries more invoices than allowed.
Both belong to the section that rejects the whole submission. According to the AEAT validation document, the RegistroFactura block repeats from 1 to 1000 times in each request, and registrations and cancellations can travel together, each in its own RegistroFactura.

How Odoo splits submissions
The module's queue runs every 1 minute and, on each run, puts each company's pending records into a single request, in chain order. That request never goes beyond 1000 records:
- The parameter verifactu.max_envelope_records sets how many records go out on each run, and if nobody touches it, it is 1000.
- Whatever does not fit stays in the queue for the next run.
- If, by any route, more than 1000 were about to be sent, the module's client stops before sending with «The AEAT accepts at most 1000 records per request.».
Inside each record the module also fits the blocks to their caps: the tax breakdown is cut to 12 lines, without warning, and an exchange of simplified invoices carries up to 1000 replaced invoices.

The pace set by the AEAT
Besides the size, the AEAT sets the pace. Each answer carries a TiempoEsperaEnvio, the seconds to wait before the next submission, and the module respects it. There is one exception: if 1000 records are already pending, it does not wait, because the request is full. If the AEAT answers with HTTP 429 for too many requests, the module waits for whatever its Retry-After header says and, if it says nothing, 60 seconds.
If you get one
With the parameter at its value, a 4113 or a 4114 should not happen. If someone raised verifactu.max_envelope_records above 1000, set it back to 1000 or leave it empty. Then resend the submissions in Failed from AEAT Submission › AEAT Errors with Retry Selected: the queue will split them into requests of the right size.
Do registrations and cancellations go in the same request?
Yes. The AEAT allows it as long as each goes in its own RegistroFactura, and the module's queue sends the company's pending registrations and cancellations together, in chain order.
Is it worth lowering the parameter?
There is no need. Fewer records per request means more requests, and each one has to wait for the TiempoEsperaEnvio set by the AEAT.
If you get one of these codes with the parameter at 1000, write to comercial@flexigobe.com with the answer of the submission.
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_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): data/verifactu_crons.xml
- prewww2.aeat.es/static_files/common/internet/dep/aplicaciones/es/aeat/tikeV1.0/cont/ws/Sis
- prewww2.aeat.es/static_files/common/internet/dep/aplicaciones/es/aeat/tikeV1.0/cont/ws/err
