Skip to main content
Portugal SAF-T (PT) File Checks

Setting up Portugal SAF-T (PT) File Checks in Odoo, told through a worked case

To get Portugal SAF-T (PT) File Checks running you need to understand three things: the SAF-T settings of each company, the fields that tie each record to a company, and the states in each list, such as Draft, Generated, Validated, Validation Failed and Delivered when generating files. Here we walk through it with an invented company, from day one to the end of the first week.

FlexigoTech · Editor in charge: Víctor Gómez · Updated 14 November 2026

Key facts

Versions
Odoo 17, 18, 19 and 20
Checked
in the module's source code, version 20.0 · against the sources linked at the end
Reading time
5 min

Distribuções Ribeira, the thread of the case

Example Illustrative case: the company and its figures are made up to explain the flow.

Distribuções Ribeira is an invented company that invoices in Portugal from Odoo 18 and runs a second company in the same database. Marta, who heads its admin team, has to get Portugal SAF-T (PT) File Checks ready. The case has no figures: what matters is which screens she opens, which fields she checks and which states she comes across.

The module is published on Odoo Apps for 17.0, 18.0, 19.0 and 20.0, so Marta picks the listing for her version. It costs €9 per Odoo version, excluding VAT, on all four versions, and because it comes with a FlexigoTech Cloud local service there is also a subscription of €29/month or €290/year excluding VAT (Pro: €58/month or €580/year). The subscription comes with a free trial, no card required.

Day one: the company's SAF-T settings

In Invoicing › SAF-T Accounting › Settings, Marta opens the SAF-T settings, which are kept per company. The form has two blocks: Company Information, with the NIF (taken from the company's tax ID, not typed by hand) and the taxonomy reference, which comes set to S - SNC base; and Email & Notifications, with the email confirmations of each delivery.

With two companies, Marta checks that each one has its Portuguese NIF: without a valid Portuguese NIF, the module does not generate that company's file. Then she clicks Test Email to see that the email confirmation goes out.

The fields Marta looks at closely

Before generating anything, Marta goes over the module fields that affect her. These are the ones she identifies:

  • company_id: appears in several of the module's models as a link to res.company. With two companies in the same database, Marta checks which company each record belongs to.
  • export_file_csv: an attachment (ir.attachment) described as Exported CSV format.
  • transaction_count, labelled Journal entries: the number of journal entries included in the SAF-T.
  • name, labelled Request ID.
  • submission_id: a link to saft.submission, described as Related SAF-T submission if applicable.

Marta gives these fields no more purpose than their name or description states. If you need to know how they fit together internally, it is covered in how the module works under the bonnet.

The states each record can have

On day two, Marta learns the state values the module defines. There are four separate sets, and it pays not to mix them up:

  • A state field with Draft, Exported and Submitted.
  • A status field with Draft, Processing, Approved and Denied.
  • A state field with Draft, Generated, Validated, Validation Failed and Delivered. These are the ones shown in the Generate SAF-T Files list; in the screenshots, taken with the previous version of the module, the last one still shows as Submitted.
  • A state field with To deliver, Delivered, Accepted by the AT and Rejected by the AT. These belong to deliveries: you deliver the file to the AT yourself, and the module records the receipt and whether the AT accepts or rejects it.

From this list, Marta notes the values she wants to keep an eye on every day: Validation Failed, Denied and Rejected by the AT. She does not assume the cause of any of them; when one appears, she looks up the exact wording in the guide to the module's error messages.

The first week: what she checks each morning

With the configuration done, during the first week Marta opens the same screens in the same order every morning. The round looks like this:

Walk through the Annual SAF-T Statistics, SAF-T Error Logs and Generate SAF-T Files lists in Invoicing
Annual SAF-T statistics with company, year, documents, value and state; error logs with date, type, severity, message and the resolved box unticked; and file generation with periods in Draft, Generated, Validated, Validation Failed and Submitted, with file size and transactions at zero.
  • In Invoicing › Annual SAF-T Statistics she looks at the Company, Year, Total Documents, Total Value and State columns, and checks that each row belongs to the company she expects.
  • In SAF-T Error Logs she reads the date, error type, severity and message of each record, and notes which ones still have the resolved box unticked.
  • In Generate SAF-T Files she reviews the state of each period, from start to end, alongside file size and transactions.

In her database, with two companies, the Company column is the first thing Marta looks at. The same list has a New button and a search bar:

Annual SAF-T statistics list with rows by company, year, total documents, total value and state, with New button and search bar
The same annual statistics list, with five rows in Borrador or Exportado state.

What the Ribeira case teaches

  • SAF-T settings are per company: the NIF comes from the company's tax ID, and Test Email lets you check the email confirmation before the first delivery.
  • company_id sits in several models. If you run more than one company, check the company on each record before anything else.
  • There are four different sets of states. Learn which list shows each one and which values you want to watch.
  • The three lists in the round (annual statistics, error logs and file generation) are Marta's routine in her first week.

How FlexigoTech can help

FlexigoTech implements Odoo 17, 18, 19 and 20 and builds bespoke connectors and integrations, so we can set up the SAF-T settings and your companies with you. If you buy the module on its flexigotech.com page, the subscription includes the module for new Odoo versions; on the Odoo App Store, by contrast, each version is bought there (Odoo Apps listing). Without a subscription, or with the service suspended, whatever the subscription provides stops, and your data stays in your Odoo. If you are still unsure whether it fits, first read what it covers and what you need before installing it.

Keep reading

How Portugal SAF-T (PT) File Checks works in Odoo, from the insideThe menus Portugal SAF-T (PT) File Checks adds to Invoicing, the models behind them, the states you see in its lists and which part uses an external service.Portugal SAF-T (PT) File Checks errors: when each message appears and what to doPortugal SAF-T (PT) File Checks error messages, word for word: when each one appears, what it means and what to do in Odoo.

More related guides

Setting up Manufacturing AI Work-Instruction Copilot: a worked example from start to finishWhat the Return Stock button in Shopify Connector for Odoo does, step by stepPSA for Odoo errors: a worked example, message by messageSetting up NIS2 Cybersecurity Compliance Toolkit in Odoo: a worked case from start to finishWhat the «Refresh Invoice Detail» button in Temu Connector for Odoo doesSetting up Flexigo Hospitality Properties and Rooms: a case from start to finishSetting up EU Digital Services Act Compliance Suite in Odoo: a case from start to finishSetting up Agriculture Management Suite in Odoo: a worked example from start to finishSetting up Whistleblower Channel in Odoo 20: a case from start to finish
Checked in the module's source code (version 20.0) and the linked sources

Sources