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 ATCUD configuration form you create from Invoicing, the fields that tie each record to a company and a schema, and the states in each list, such as Draft, Generated, Validated, Validation Failed and Submitted 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 4 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, one-off and 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).

Day one: the ATCUD configuration form

When she creates a new ATCUD configuration from Invoicing, Marta finds a form split into sections: company information, ATCUD, email and notifications, and upload. Only the endpoint URL appears filled in; the rest is empty.

New ATCUD configuration form in Invoicing with company information, ATCUD, email and notifications and upload sections
A freshly created ATCUD configuration with no data yet: only the endpoint URL is filled in and the bottom of the screen is cut off.

What Marta does is go through the form section by section, top to bottom, including the part that does not fit on screen. The endpoint URL already being there tells her nothing about the rest, so she does not treat the configuration as complete until she has checked all of it.

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.
  • schema_url, labelled SAF-T Schema URL: according to the field description, the URL from which the Portuguese SAF-T XSD schema is fetched.
  • export_file_csv: an attachment (ir.attachment) described as Exported CSV format.
  • transaction_count, labelled Transaction Count: the number of transactions 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 Submitted. These are the ones shown in the Generate SAF-T Files list.
  • A state field with Draft, Validated, Submitted, Accepted, Rejected, ATCUD Unreachable and Error.

From this list, Marta notes the values she wants to keep an eye on every day: Validation Failed, Denied, Rejected, ATCUD Unreachable and Error. 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

  • The new ATCUD form appears almost empty, with only the endpoint URL: go through it section by section, including the part that does not fit on screen, before treating it as complete.
  • 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 ATCUD configuration 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 doEvery Portugal SAF-T (PT) File Checks error message, word for word: when it appears, what it means and what to do in Odoo, from generation to ATCUD submission.Portugal SAF-T (PT) File Checks: what it covers, what you need first and which Odoo versionWhat Portugal SAF-T (PT) File Checks covers according to its README, what you need before installing it (NIF, ATCUD, email) and which Odoo versions.
Checked in the module's source code (version 20.0) and the linked sources

Sources