How it is declared
The EmitidaPorTerceroODestinatario field accepts two values, and each one makes a different block mandatory:
- T, issued by a third party
- The Tercero block is mandatory, with the tax ID of whoever issues the invoice.
- D, issued by the recipient
- The Destinatarios (recipients) block is mandatory.
The Tercero block can only appear with value T. If it is identified with a Spanish tax ID, that tax ID has to be on record at the AEAT and be different from that of the party obliged to issue the invoice. And it can never be identified with type 07, «No censado» (not in the census).

The nine codes
| Code | What fails |
|---|---|
| 1151 | The field only accepts T or D. |
| 1155 | There is a Tercero block without the EmitidaPorTerceroODestinatario field. |
| 1158 | The field is there, but its matching block is missing. |
| 1159 | The Tercero block is reported while the field says D, recipient. |
| 1178 | Generic error in the Tercero block. |
| 1186 | With T, the Tercero block is missing. |
| 1187 | There is a Tercero block with a value other than T. |
| 1188 | The third party's tax ID is the same as that of the obliged party. |
| 1211 | The third party is identified with type 07. |
All of them reject the record of the affected invoice; the rest of the submission carries on, and the rejected invoice remains pending correction.
What our module declares
The registration record built by the module carries neither the EmitidaPorTerceroODestinatario field nor the Tercero block. That is why none of these nine codes can come from one of its submissions. Every invoice is declared as issued by the company itself: its tax ID goes as the obliged party in the header and as the issuer on each invoice.
That covers the normal case, which is most cases: you sell and you invoice from your own Odoo. The two special cases are not reflected:
- If a third party issues invoices in your name, for example a service company that bills for you, the module does not declare it as such.
- If it is your customer who issues the invoices for what you sell them, under a self-billing agreement, those invoices are not born in your Odoo and the module does not send them.
If you work with either of these arrangements, write to comercial@flexigobe.com before turning VeriFactu on for those invoices.

Not to be confused with the representative
A tax adviser submitting your records to the AEAT does not become a third-party issuer. The adviser submits, and that is what the header's Representante block is for; the third party issues, and that goes on each invoice. The Representante errors, from 4105 to 4124, are on their own page.
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) |
|---|---|
| 1151 | El campo EmitidaPorTerceroODestinatario solo acepta valores T o D. |
| 1155 | Se está informando el bloque Tercero sin estar informado el campo EmitidaPorTerceroODestinatario. |
| 1158 | Se está informando EmitidaPorTerceroODestinatario, pero no se informa el bloque correspondiente. |
| 1159 | Se está informando del bloque Tercero cuando se indica que se va a informar de Destinatario. |
| 1178 | Error en el bloque de Tercero. |
| 1186 | Si EmitidaPorTercerosODestinatario es igual a T el bloque Tercero será de cumplimentación obligatoria. |
| 1187 | Sólo se podrá cumplimentarse el bloque Tercero si el valor de EmitidaPorTercerosODestinatario es T. |
| 1188 | El NIF del bloque Tercero debe ser diferente al NIF del ObligadoEmision. |
| 1211 | El bloque Tercero no puede estar identificado con IDType=No Censado (07). |
What if I see one of these codes with Odoo?
It should not happen with a submission from the module. If you get one, send us the answer of the submission: it would mean something else is sending with your tax ID.
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): data/verifactu_error_catalogue.xml
- prewww2.aeat.es/static_files/common/internet/dep/aplicaciones/es/aeat/tikeV1.0/cont/ws/err
