Format: what Odoo stops first
When an invoice with a Spanish tax ID (NIF) is posted, the module validates it before chaining: length of 9, digits, check letter, an NIE starting with X, Y or Z, and the CIF of companies. If something fails, the invoice is not posted and Cannot post invoice: invalid counterparty identifier. appears, followed by the reason. That is why the two AEAT format codes are rare with the module:
- 1123:
El formato del NIF es incorrecto., the tax ID format is wrong. - 1290:
El campo ID no contiene un NIF con formato correcto., the ID field does not hold a correctly formatted tax ID.
If a customer has no tax ID in Odoo, there is nothing to validate and the invoice goes out as simplified, with no recipient.

Census: what only the AEAT knows
A tax ID can be perfectly formed and still not exist in the AEAT census. There are several codes for that, and they do not all treat the invoice the same way:
| Code | AEAT text, in short | Effect |
|---|---|---|
| 1109 and 1110 | El NIF no está identificado en el censo de la AEAT. | Reject the record. |
| 1121 | El campo ID no está identificado en el censo de la AEAT. | Rejects the record. |
| 1193 | In Destinatarios, the tax ID must be identified and different from the issuer's. | Rejects the record. |
| 1154 | The issuer of the corrected or replaced invoice cannot be found in the census. | Rejects the record. |
| 2001 | The tax ID in the recipients block is not in the census. | Accepts the record and asks for a correction. |
The official list gives 1109 and 1110 the same text and does not explain what sets them apart. 2001, on the other hand, is explained in the validation document as an admissible error, and has its own page.
Two cases worth recognising
1193 has a catch: besides being in the census, the customer's tax ID has to be different from yours. An invoice to your own company, with your tax ID as customer, triggers it.
1154 looks at the block of the corrected invoice. In a credit note, the module identifies the original invoice with your own tax ID as issuer, so it could only appear if your company's tax ID were not in the census.

Name: code 1283
«Si el NIF de la contraparte es persona fisica se debe informar tambien de su NombreRazon»: if the counterparty's tax ID belongs to an individual, their name must be included too. With the module, the name always travels with the tax ID: it is the contact's name and, if that were empty, the number itself.
What to do with a rejection
- Check the tax ID with the customer and correct it on their Odoo contact for the next invoices.
- Remember that the submission is built from the record created at posting: the queue will retry the same record, with the old tax ID, until it lands in Dead Letter.
- For the rejected invoice, write to comercial@flexigobe.com with its number and we will close it with you.
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) |
|---|---|
| 1109 | El NIF no está identificado en el censo de la AEAT. |
| 1110 | El NIF no está identificado en el censo de la AEAT. |
| 1121 | El campo ID no está identificado en el censo de la AEAT. |
| 1123 | El formato del NIF es incorrecto. |
| 1154 | El NIF del emisor de la factura rectificada/sustitutiva no se ha podido identificar en el censo de la AEAT. |
| 1193 | En el bloque Destinatarios si se identifica mediante NIF, el NIF debe estar identificado y ser distinto del NIF ObligadoEmision. |
| 1283 | Si el NIF de la contraparte es persona fisica se debe informar tambien de su NombreRazon |
| 1290 | El campo ID no contiene un NIF con formato correcto. |
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/account_move.py
- 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
