How to generate the accounting SAF-T
What is it for?
The accounting SAF-T is the file with all the posted journal entries of a fiscal year, the chart of accounts with the taxonomies, and the debit and credit totals. It is the basis of the IES (Simplified Business Information) for that fiscal year. Odoo generates it, checks it before saving it and keeps each generation, so that you can download and submit it. Pending validation by a certified accountant: the obligation and deadline for submitting the accounting SAF-T with the IES.
When to use it?
- You have closed the fiscal year and are going to prepare the IES.
- The AT or the auditor asked for the accounting file for a period.
- You corrected journal entries of a fiscal year and need a new file: each generation is kept separately.
- It is not the monthly invoicing file: that one is generated with mode F — Invoicing, in How to generate the invoicing SAF-T file.
Where to find it?
Accounting › Declare › Generate SAF-T (in the SAF-T file group).
Before you start
- Your profile is Fiscal officer. On its own, without any other accounting profile, it reaches every step: it has the Accounting app with the Declare › Generate SAF-T menu, generates the file and downloads it (tested with a user with only this profile).
- The Download file button appears to the profiles Fiscal officer, Fiscal administration (an internal fiscaldoo profile, not the AT), Management, Auditor and Accountant. The Accountant generates and downloads the file, but does not have Record submission.
- All the journal entries of the fiscal year are posted and the fiscal year is closed, or at least checked: the file is a snapshot of the moment it is generated.
- Every account with movements has its taxonomy: without it, Odoo does not generate the file.
- The example is the 2025 fiscal year of Empresa Demonstração, Lda, already closed (lock date 31/12/2025).
How to use it
- Open Accounting › Declare › Generate SAF-T. The Generate SAF-T (PT) window opens with Mode F — Invoicing and Period Month. In Mode, choose C — Accounting.
- In Period, choose Fiscal Year. The other options are Month, Quarter and Custom range.
- In Reference date, type a day of the fiscal year, for example
15/06/2025. The Date From and Date To change to01/01/2025and31/12/2025. - Read STEP 2 OF 3: CHECKS. In a closed fiscal year there is no warning. In an open period you see “The period is still open (lock date: …): entries up to … can still change after this file is generated. Lock the period when it is final.” Leave Lock entries up to the end date after generating? unticked, unless the certified accountant has already declared the fiscal year closed.
- In STEP 3 OF 3: GENERATE THE FILE, check the number of journal entries (“59 documents in this period will go into the file.”) and click Generate with 59 documents.
- The SAF-T (PT) export record opens in the Generated state. Click Download file.
Expected result
- The record has the Generated file name
SAFT-PT_509999999_2025_FY_C.xml(tax number (NIF), year, “FY” for fiscal year and the mode), the File SHA-256, Error Count 0, Warning count 0 and Submission status Not sent. If the record has errors or warnings, correct them as in How to fix SAF-T validation errors, which also covers the accounting file, and generate again. - In NOTES, the checks made before saving, all “OK”: in the example, “TotalDebit = TotalCredit: 1156500.00 = 1156500.00”, “Transactions = posted entries of the period: 59 of 59”, all the line accounts in the chart, all the movement accounts with a taxonomy and no duplicated journal entry.
- With each generation, Odoo also runs the semantic validation of the file (rules SVAT-01 to SVAT-07 of Ordinance (Portaria) no. 302/2016) and keeps the result in a second attachment of the record,
saft_svat_N.xlsx(N is the export number), with the sheets Rules (rule, description, source, checked, findings, result) and Findings. In the accounting SAF-T the rules concern invoices and return “Not applicable: the file has no SalesInvoices section.”. At present this attachment is not shown on screen to any profile (the record does not show attachments); if support sends it to you, this is what it is. - The downloaded file matches the screen: 59 journal entries (
NumberOfEntries), €1,156,500.00 debit and credit,TaxAccountingBasisC and fiscal year 2025, with no invoicing documents. It is encoded in Windows-1252, as SAF-T (PT) requires: open it with a program that respects that encoding, or the accented characters will look garbled.
Important notes
- One generation per snapshot. If you change a journal entry of the fiscal year after generating, generate again; the old records stay as history and are not deleted.
- Locking the period after generating prevents new journal entries and changes up to the Date To. Only tick it when the fiscal year is closed and checked by the certified accountant.
- Record submission and Submit (simulated channel) are part of submitting the file, which this article does not cover.
- What the file does not include. Only posted journal entries dated within the period are included (the check compares them with the “posted entries of the period”): drafts are left out. Check beforehand, in Accounting › Record › Journal entries, that there are no drafts for the fiscal year.
Common problems
The number of documents is lower than I expected
- Cause: there are draft journal entries in the period, or the Date From and Date To are not those of the fiscal year.
- What to do: check the dates from step 1 and post or delete the fiscal year's drafts; then generate again.