Skip to main content
Portugal · series and ATCUD

The ATCUD code, explained with an Odoo invoice

The ATCUD is the unique code every invoice and every tax-relevant document issued in Portugal must carry. It has two parts: the validation code the Tax Authority (AT) gives a series when it is registered, and the document's sequential number in that series, joined by a hyphen. An invoice FT 2026A/15 in a series with the code ABCD1234 carries the ATCUD ABCD1234-15, printed as "ATCUD:ABCD1234-15".

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

Key facts

Versions
Odoo 17, 18, 19 and 20
Checked
against the sources linked at the end
Reading time
3 min

Where the obligation comes from

The ATCUD comes from article 35 of Decree-Law 28/2019 of 15 February: the AT assigns a code to every registered series, which must then be part of the unique document code. Portaria 195/2020 of 13 August sets out how (articles 3 and 4): the validation code has at least 8 characters, is joined to the sequential number with a "-" and is printed as "ATCUD:code-number". After 2021, when it was voluntary (Law 75-B/2020, article 404), and 2022, when Despacho 351/2021-XXII made it optional, the ATCUD has been mandatory on every invoice and tax-relevant document since 1 January 2023, the date Law 12/2022 (article 316) uses as its reference.

How the validation code is obtained

  1. Define the series before using it: the identifier (for example 2026A), the document type, the first number and the planned start date.
  2. Register it with the AT, on the Portal das Finanças or by webservice, before issuing the first document.
  3. The AT returns the series validation code, 8 or more characters long.
  4. Every document in that series carries the ATCUD: validation code, hyphen and sequential number.

The QR code, mandatory since 1 January 2022 on invoices and documents issued by certified programs (article 6 of the same Portaria; optional in 2021 under Law 75-B/2020), carries the ATCUD too, in field H.

In Odoo, without a module

Odoo 17, 18, 19 and 20 ship no ATCUD, no AT QR code and no SAF-T (PT): we searched the source code of the four versions and the term does not appear. Odoo's own numbering knows nothing about series registered with the AT.

In Odoo, with CIUS-PT & ATCUD

With the CIUS-PT & ATCUD module, each series has an "AT Validation Code" field, locked as soon as an invoice uses it. The ATCUD is built from the series code and the digits after the slash of the printed number. If the code is missing or the number does not end in "/digits", the invoice is not issued and the error says why.

The module's series list in Odoo, with each series' AT validation code and status
The module's series, each with its AT validation code, locked after the first invoice (test data).

You register the series with the AT on the Portal das Finanças and type the validation code the AT returns into the series in Odoo. The invoice QR code is generated in byte mode, as the AT technical specifications require.

Customer invoice in Odoo with the ATCUD, the AT QR code and the module's CIUS-PT XML button
An invoice issued with the module: the ATCUD joins the series validation code and the document number, and the QR code carries it in field H (test data).

The full price: €9 per Odoo version on Odoo Apps plus the FlexigoTech Cloud subscription, Standard at €29 a month or €290 a year, VAT excluded, with a 14-day trial and no card.

What it does not do yet

The module's AT certification is in progress. Until the AT gives its number, documents carry certificate 0, and a business that invoices under Portuguese rules with invoicing software cannot use it yet to issue its legal invoices. It invoices in a program that is already certified or in the AT's applications (what the law requires).

Does the ATCUD replace the invoice number?

No. The invoice keeps its number (FT 2026A/15); the ATCUD adds the series validation code to it.

Can I change the validation code of a series already in use?

Not in the module: the field locks when the first invoice carries it. For a new series, you register a new series.

Keep reading

Invoicing in Portugal with Odoo: what the law requires and what Odoo is missingWhat Portuguese law requires from businesses invoicing with Odoo, with the laws and dates in force on 17-11-2026, what Odoo ships and what the modules cover.CIUS-PT: the XML Portuguese public bodies accept, from an Odoo invoiceWhat CIUS-PT 2.1.1 is, who must invoice public bodies with it, some of the rules the module meets and how Odoo generates the XML with ATCUD and QR.Accounting and invoicing SAF-T in Portugal: what each file holds and when it is dueThe two SAF-T (PT) files: invoicing reported by the 5th, accounting filed before the IES from financial year 2027. Laws, deadlines and what each Odoo module generates.
Checked against the linked sources

Sources