The rule, in one table
| Invoice type | Recipient | Code when broken |
|---|---|---|
| F1, F3, R1, R2, R3, R4 | Mandatory, at least one. | 1189 |
| F2, R5 | Not allowed. | 1190 |
| R3 | Only a Spanish tax ID or IDType 07 (not in the census). | 1191 |
| R2 | Only a Spanish tax ID, IDType 07 or IDType 02 (EU VAT number). | 1192 |
| Any type with IDOtro of type 02 | Only F1, F3, R1, R2, R3 or R4. | 1156 |
For reference: F1 is a full invoice, F2 a simplified one, F3 an invoice that replaces simplified ones, and R1 to R5 are corrective invoices. One more general code: 1106, El valor del campo TipoFactura no está incluido en la lista de valores permitidos., the invoice type is not in the list of allowed values. All of them reject the record, not the whole submission.

How Odoo decides the type and the recipient
When an invoice is posted, the module classifies it and, with that class, decides whether to add a recipient:
- A credit note goes out as R1, or as R5 if it corrects an invoice that was registered as F2. Today the module does not tell correction reasons apart, so R2, R3 and R4 never go out.
- An invoice flagged as an exchange of simplified invoices goes out as F3.
- A POS invoice, one ticked as «Factura simplificada (F2)» or one whose customer has no tax ID goes out as F2.
- Everything else goes out as F1.
After that, the recipients block is only included if the customer has an identifier and the type is neither F2 nor R5. That rules out 1189, because an invoice without the customer's tax ID never goes out as F1, and 1190, because an F2 or an R5 never carries a recipient. 1106 should not show up either: the module only uses types the AEAT accepts (F1, F2, F3, R1 and R5).

1191 and 1192 with today's module
Both depend on the type of credit note and the customer's country. A customer outside Spain travels in IDOtro with type 02 if they are in the EU, and with type 03 or 04 if not. Crossed with the table, an R3 to a foreign customer would clash with 1191, which only accepts a Spanish tax ID or type 07, and an R2 to a customer outside the EU with 1192.
With today's module neither of them arrives this way, because it issues no R2 and no R3. The flip side is that a credit note that should be an R2, R3 or R4 under the rules is declared as R1. If you issue credit notes of that kind, write to comercial@flexigobe.com before posting them.
Once it has been rejected
The queue retries the rejected record until it lands in Dead Letter, but the record is the one created at posting and it does not change even if you correct the contact. The published module does not send the correction on its own. Write to comercial@flexigobe.com with the invoice number and we will help you close it.
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) |
|---|---|
| 1189 | Si TipoFactura es F1 o F3 o R1 o R2 o R3 o R4 el bloque Destinatarios tiene que estar cumplimentado. |
| 1190 | Si TipoFactura es F2 o R5 el bloque Destinatarios no puede estar cumplimentado. |
| 1191 | Si TipoFactura es R3 sólo se admitirá NIF o IDType = No Censado (07). |
| 1192 | Si TipoFactura es R2 sólo se admitirá NIF o IDType = No Censado (07) o NIF-IVA (02). |
| 1106 | El valor del campo TipoFactura no está incluido en la lista de valores permitidos. |
| 1156 | Para el bloque IDOtro y IDType NIF-IVA (02), el valor de TipoFactura es incorrecto. |
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
