Portugal QES on PDF Invoices
Qualified electronic signatures & CIUS-PT — ready for the 1 January 2027 mandate
From 1 January 2027 a PDF invoice is a legally valid electronic invoice in Portugal only when it carries a Qualified Electronic Signature (QES). This module prepares your customer-invoice PDFs for qualified signing — and, as the mandate allows, issues the structured CIUS-PT (EN 16931) document instead. The qualified key stays in your Trust Service Provider's QSCD: bring-your-own-key, signed remotely, never bundled.
What it does
PAdES signature preparation
Appends a PDF incremental-update revision with an
ETSI.CAdES.detached signature dictionary, a fixed
/ByteRange and a reserved /Contents
placeholder. Computes the ByteRange digest and the CAdES
signedAttributes (content-type, message-digest and the
ETSI signing-certificate-v2 attribute) with a
dependency-light DER encoder.
BYOK remote qualified signing
A Cloud Signature Consortium (CSC v2) client calls
credentials/info and signatures/signHash on
your qualified TSP with your own access token and credential. Only the
document digest is sent; the returned signature is wrapped into a
detached CAdES SignedData and embedded into the PDF.
CIUS-PT structured invoice
EN 16931 UBL 2.1 Invoice / CreditNote with the Portuguese customization id and the Peppol billing profile — the structured alternative the 2027 rule accepts alongside QES-on-PDF.
ATCUD + AT QR code
Builds the <validation-code>-<sequence> ATCUD
and the AT QR string (fields A..R) with the per-region VAT band
breakdown, rendered to a PNG for the printed invoice.
Real NIF / NIPC validation
The published Autoridade Tributária mod-11 check-digit algorithm on company and partner, with holder-class detection (natural person / NIPC / public entity / sole trader).
Validation profile & onboarding
A Portuguese rule set layered on the shared engine's EN 16931 core (seller/buyer NIF, EUR, tax region, ATCUD, VAT category), plus a guided onboarding wizard, a signing-connection model, an optional batch cron and full transport logging.
How signing works
- Prepare — the invoice PDF is rendered and a PAdES revision is appended with a placeholder and a stable ByteRange.
- Digest — the ByteRange is hashed and the CAdES signed attributes are assembled; the digest to sign is stored.
- Sign (BYOK) — your qualified TSP signs the digest in its QSCD and returns the signature value.
- Embed — the signature is wrapped into a CAdES SignedData and written into the reserved hole, yielding the final signed PDF.
Compatibility & disclosure
Compatible with Odoo 18 and Odoo 19 (Community). Built on the shared e-Invoice Core Engine; no engine functionality is duplicated.
Disclosure: this module transmits only document digests to the qualified TSP signing endpoint you configure. Your access token, credential and any PIN/SAD are stored solely on your own database and are never sent anywhere else.
Screenshots
Portugal Invoice Cius Pt Iss
Generated Cius Pt Structured
Update date: 2026-07-02
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Discuss (mail)
• Invoicing (account) |
| Community Apps Dependencies | Show |
| Lines of code | 3306 |
| Technical Name |
l10n_pt_qes_pdf |
| License | OPL-1 |
| Website | https://pokutsoft.com/ |
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module