Skip to main content
Pending validationOdoo 20.0Community and Enterprise

How to fix SAF-T validation errors

What is it for?​

An Invalid SAF-T file cannot be submitted. The export record lists each error, says who fixes it and takes you to the record to fix. After fixing, you generate again and check that the file becomes Generated.

When to use it?​

Where to find it?​

Accounting › Declare › SAF-T file › What is there to do with the SAF-T?, supporting list SAF-T generated, and open the Invalid record. You can also get there from the SAF-T export of a monthly communication.

Before you start​

  • To read the list and regenerate: Accountant profile or higher. The steps and the example were done with the Accountant profile, up to the Generated file.
  • To fix: each line says Who corrects it (for example “The person who keeps the contacts (Accountant or Invoicing)”). If it is not your profile, send them the list (step 3).

How to use it​

  1. Open the SAF-T (PT) export record in the Invalid state. The header shows the Error Count and the Errors by type. In the example, the C — Accounting file for October 2026: 1 error, “Format or invalid value: 1”. The Warning count of an invalid record stays at 0, because generation stopped before counting them: the warnings appear on the new record (step 6).
  2. Scroll down to the Errors list. Each line has the Type, the Node (where it sits in the file), the Key (the record with the problem, for example the supplier's name), the Message, Who corrects it, the Suggestion and the Open the record to fix button.
  3. The list cuts long texts short. To read them in full, or to send them to whoever fixes them, click Export errors (XLSX): the browser saves a spreadsheet (in the example, saft_erros_10.xlsx, with the columns Type, Node, Key, Message, Suggestion, Record to fix and Who corrects it).
  4. On each line, click Open the record to fix. The right record opens (in the example, the form of the supplier Fornecedor Sem NIF Exemplo, Lda). Fix what the Message says (for a missing NIF, type in the NIF field the tax number shown on the supplier's invoice; a Portuguese NIF shows Valid tax number, one from another country Tax number to validate), save and go back to the export record using the breadcrumb at the top. Before fixing, read the table below: a NIF must never be made up.
  5. Click Regenerate. fiscaldoo generates a new file, in a new record; the old record is kept as history.
  6. Read the new record. If it still has errors, repeat steps 2 to 5. When it becomes Generated, with Error Count 0, read the warnings (see “Important notes”) and:

The errors seen and where they are fixed​

Error (on-screen message)Where it is fixedStatus today
“What: the supplier “…” has no tax number (NIF). Why: the Tax Authority requires the NIF of every supplier in the file, and the generic final-consumer NIF only exists for customers. How: fill in the NIF in the supplier's contact (it is on the invoice received) and generate the file again.”Supplier formIn C and I files, because of purchase invoices. Type the supplier's NIF on the form, save and click Regenerate (see “Supplier without a NIF”, below). In F, only with a return delivery note issued to that supplier before fiscaldoo started refusing delivery notes without a NIF: see “Common problems”.
“The supplier Consumidor-final is used in the transport documents but is not in the file.” (type Orphan reference)Not fixed on the formOnly in F, next to the previous error, for a return delivery note to a supplier that was issued as addressed to a final consumer, before fiscaldoo started refusing delivery notes without a NIF. See “Common problems”.
“Sales document "…" is posted but has no SAF-T series/number (its journal is not certified) — it cannot be left out of the file silently. Issue it in a certified journal or fix the journal before generating.”Journal and documentSee “Common problems” in How to generate the billing SAF-T file.

Supplier without a NIF​

  • In accounting files: a C — Accounting or I — Integrated accounting/invoicing file becomes Invalid when the period has a purchase invoice from a supplier whose form has no NIF.
  • In the billing file: the month's F — Invoicing file does not include the suppliers of purchase invoices, so it does not become Invalid because of them. In the demo, with the supplier invoice already posted, the October 2026 F file was Generated, without that supplier in the downloaded file, and the C file for the same month was Invalid, with this error and no other (example below). Pending validation by a certified accountant: billing SAF-T file without the table of suppliers from purchase invoices (Portaria n.º 302/2016, annex I).
  • The return delivery note, in the billing file: the F file includes the supplier to whom the month has a return delivery note (returning goods received from them), with their NIF. That is why fiscaldoo does not issue that delivery note to a supplier without a NIF: “What: the supplier "Fornecedor Devolução Sem NIF, Lda" has no VAT number. Why: a supplier is a taxable person, so the guide that takes goods back to it must carry its VAT number (DL 147/2003, art. 4.º n.º 2 c)). How: fill in the VAT number on the supplier's contact (it is on the invoice received) and issue the guide again.” The refusal does not offer another way out. In the demo, after the NIF 510000061 (fictitious) was entered on the form, the delivery note was issued as GD D26/1, and the October F file was Generated, with 0 errors and that supplier in the downloaded file, with the NIF.
  • What to do: type on the form the NIF shown on the supplier's invoice and save. For an invalid C or I file, then click Regenerate (example below); for a return delivery note, issue it only after the NIF is entered. A NIF must never be made up, and the final consumer NIF 999999990 cannot be used for a supplier: the message says that NIF only exists for customers.

Customer without a NIF: not an error​

An invoice to a customer without a NIF, from Portugal or another country, does not make the file Invalid: the file declares the customer as “Consumidor final” (final consumer), with NIF 999999990 and their country, like the invoice's QR code, and the record becomes Generated, with a warning in the Warnings list.

In the demo, October 2026 had FT D26/33 to Cliente Sem NIF Exemplo (Portugal, no NIF) and FT D26/36 to Cliente Particular Espanha (Spain, no NIF), each for €10.00 + €2.30 VAT. With the Accountant profile, Generate SAF-T with F — Invoicing and October 2026 gave Generate with 14 documents (the window counts 9 sales documents, 4 delivery notes and 1 working document), and the record became Generated, with 0 errors and 5 warnings:

  • one warning for each of the two customers without a NIF;
  • 3 address warnings for Cliente Alemanha Exemplo GmbH, whose form has no street, city or postcode.

The warning for the customer from Spain:

“What: the customer “Cliente Particular Espanha” has no NIF. Why: the invoice was issued to a final consumer (the QR code carries NIF 999999990), so the file declares it the same way: CustomerTaxID 999999990, name “Consumidor final” and country “ES”. How: there is nothing to do in this file. An issued document never changes, so a NIF filled in on the form afterwards only applies to documents issued from then on. To identify this customer on an invoice already issued, correct it with a credit note that references it and issue a new invoice with the NIF (the credit note corrects the invoice, it does not cancel it; to cancel it, talk to your certified accountant).”

In the downloaded file, that customer is Consumidor-final-ES, with NIF 999999990 and country ES, and the one from Portugal is Consumidor-final, with NIF 999999990 and country “Desconhecido” (unknown). The warning for the customer from Portugal says the same: “… so the file declares it the same way: CustomerTaxID 999999990, name “Consumidor final” and country “Desconhecido”.” The file has no supplier: the purchase invoice in the example below does not count for it.

Why is the country “Desconhecido” (unknown) if the form says Portugal? It is not an error, and you do not need to fix anything. When a customer from Portugal does not give their NIF, fiscaldoo always declares them in the file as the generic final consumer, with no country, even if the form has Country Portugal. This choice was made so as not to change what the certified file declares; a customer from another country carries their own country, like the one from Spain. Pending validation by a certified accountant: country of the Portuguese final consumer in the SAF-T (“Desconhecido” or PT).

The warning does not ask for anything in the file. If the customer wants the invoice with their NIF, or is a company, the issue is the invoice: what to do, with the example of FT D26/36 corrected, is in The SAF-T is not generated or is Invalid, section “The customer is from another country and has no NIF”. Pending validation by a certified accountant: sale to a private individual from another country who does not give a tax number, declared as final consumer with NIF 999999990 and the customer's country (Portaria n.º 302/2016, annex I, point 2.2.3).

Full example, up to Generated​

Done in Empresa Demonstração, Lda, on 31/10/2026, with the Accountant profile. Beforehand, the supplier invoice FTF/2026/00046 was posted (supplier reference FT 2026/88, dated 28/10/2026, €100.00 + €23.00 VAT), from a new contact, Fornecedor Sem NIF Exemplo, Lda, created with Country Portugal and no NIF. The journal entry for that invoice: debit of €100.00 to 6221 Trabalhos especializados (Specialised services) and €23.00 to 2432 IVA - Dedutível (Deductible VAT), and credit of €123.00 to 2211 Fornecedores gerais (General suppliers).

  1. Generate SAF-T with F — Invoicing and October 2026 (Reference date 15/10/2026): Generate with 14 documents, record Generated, with 0 errors and the 5 warnings from “Customer without a NIF: not an error”. The downloaded file has no supplier.
  2. Generate SAF-T with C — Accounting and the same month: the button says Generate with 48 documents and the record becomes Invalid, with 1 error, “Format or invalid value: 1”, and Warning count 0. In the Errors list, the Node is MasterFiles/Supplier/tax_id, the Key is “Fornecedor Sem NIF Exemplo, Lda” and the Message is the one in the table above. Who corrects it: “The person who keeps the contacts (Accountant or Invoicing)”. The record's history says “SAF-T (PT) generation blocked: 1 referential integrity error(s). No file was produced.”
  3. Export errors (XLSX) saved saft_erros_10.xlsx, with one line.
  4. Open the record to fix opened the Fornecedor Sem NIF Exemplo, Lda form, with no warning at the top. The NIF 510000053 (fictitious) was entered, Valid tax number appeared and the form was saved.
  5. Back on the record via the breadcrumb at the top, Regenerate created a new record: Generated, Error Count 0, Warning count 17, file SAFT-PT_509999999_2026_10_C.xml, with Download file. The record's check note says “Transactions = posted entries of the period: 48 of 48 — OK”, the same number as the button in step 2.

Expected result​

  • The new record is Generated, with Error Count 0, and can now be downloaded and submitted.
  • The previous invalid records stay in the SAF-T generated list as history. Fixing an error does not create journal entries (in the example, fixing the form and regenerating created none); a fix that requires issuing a document (for example, a credit note) follows that document's article.

Important notes​

  • Regenerate uses the current version of the data and the product. If the errors had already been fixed when the file was generated, click Regenerate and the new file passes.
  • Warnings do not make the file invalid, but they tell you what came out incomplete. In the example, the 17 warnings on the new record are:
    • 9 about the names of the month's sales entries, one per entry, for example “What: the name of entry “FT D26/33” had spaces, which were removed in the TransactionID, where the name is “FTD26/33”. Why: the TransactionID of the SAF-T is the date, the journal and the name without spaces (the file's pattern does not allow spaces). How: nothing to do; the entry itself keeps its name.”;
    • 6 about addresses, three per form, from the example supplier's form and from Cliente Alemanha Exemplo GmbH: “What: the address has no street. Why: the file requires one, so “Desconhecido” (unknown) was written instead. How: fill in the street in the contact.”, and the same for the city and the postcode;
    • 2 about customers without a NIF treated as final consumers (above).
  • Fill in the address on the form of a real customer or supplier and click Regenerate before submitting. The Final consumer form is for people who do not identify themselves: do not type a customer's address on it (in the example, it gave no warnings). Pending validation by a certified accountant: address and country “Desconhecido” (unknown) of the final consumer customer in the SAF-T.
  • Do not submit an Invalid file.

Common problems​

I fixed everything and the file is still “Invalid”​

  • Cause: you are looking at the old record, or there is an error of another type.
  • What to do: Regenerate opens the new record; check that this is the one you are looking at (the date and time are in the name). Read the Errors list of the new record again.

The billing file became “Invalid” because of a supplier without a NIF​

  • Symptom: a record with Mode F — Invoicing becomes Invalid, with the supplier-without-NIF error (node MasterFiles/Supplier/tax_id) and, next to it, the Orphan reference “The supplier Consumidor-final is used in the transport documents but is not in the file.” (node SourceDocuments/MovementOfGoods/StockMovement/SupplierID).
  • Cause: the month has a return delivery note to a supplier without a NIF, issued as addressed to a final consumer before fiscaldoo started refusing that delivery note (see “Supplier without a NIF”). A supplier is a taxable person: the delivery note was issued wrongly, without the recipient's NIF. Today, the delivery note can no longer be issued this way, so the demo cannot reproduce this case.
  • What to do: do not treat this error as a contact data problem. An issued delivery note cannot be changed, and entering the NIF on the form does not change what the delivery note says. Talk to the Fiscal officer and your certified accountant, who decide what to do with the delivery note already issued (for example, cancel it and issue another with the NIF, if the goods have not left yet). Pending validation by a certified accountant: what to do with a return delivery note already issued to a supplier without their NIF.
  • If the month has no delivery note to that supplier: the F file should not become Invalid because of them. Send support the Export errors (XLSX) spreadsheet and the record's name.

I do not know what to do with a message​

  • What to do: click Export errors (XLSX) and send the spreadsheet to your certified accountant or to support, with the record's name (company, date and time).
Versions: Odoo 20.0Community and Enterprisefiscaldoo 20.0 (master 27cebe13a)ID DOC-0054
Was this page helpful?