Skip to main content

[!WARNING] Backport from Odoo work in progress in https://github.com/odoo/odoo/pull/196102

Can have changes without notice. Should be removed once the upstream WIP is merged.

This commit implements many requirements for Portugal:

Hash

Sale journals should be hashed. For this, the following fields are used: date, l10n_pt_hashed_on, name, amount_total as well as the hash of the previous account.move. These are sent to IAP, where we'll use a private key (belonging to Odoo) to sign the documents. To avoid too many RPC calls to IAP, the documents are signed only when sent&printed, or manually when clicking on the 'Lock' button. At that point, moves are batched such that we have only once RPC call to IAP.

AT Series

This is a new model. It represents a mapping between the Odoo series (e.g. INV2024), and the series from the Autoridade Tributaria (AT). The user has to manually create these on the government portal. The series given by the government is unique across all accounting softwares. It will be useful for the ATCUD and QR code below. They are available from the Accounting Settings.

ATCUD

The ATCUD code is a unique code that represents a unique document in Portugal. It's the simple concatenation of the AT series and the sequence number within that series. It must be displayed on the document whenever it is signed.

QR Code

A QR code must also be displayed on any signed document. This QR code contains several info such as the customer VAT (if any), the total amount of the document, or the tax totals.

Misc requirements

  • if a product is exempted from VAT, we must mention why choosing one of the predefined categories. This is a new field on account.tax

  • we cannot change tax number of an existing client with already issued documents. However, missing tax number can only be entered if the field is empty (or filled with generic client tax 999999990)

  • do not allow change the name of client (if it already has issued docs) who has no tax number. Limitation ends when client has a tax number.

  • do not allow change ProductDescription if already issued docs

Layout requirements

  • Documents that are not invoices must indicate "Este documento não serve de fatura"

  • Signed documents must indicate "E.g.: HASH - Processado por programa certificado n.º 0000/AT" where HASH is the 1st, 11th, 21st, 31st chars of the hash/signature.

  • Non-signed documents that are invoices must indicate "Emitido por programa certificado n.º 0000/AT"

  • Each page must contain: the document name, page number, total number of pages, and the accumulated amount for that page. The latter requirement is not possible with wkhtmltopdf as we don't know in advance of many pages the pdf version will have, so we cannot calculate the sub amount for each page. For this reason, we add an accumulated amount column only if we are in a pdf version, and that we have more than 5 invoice lines (i.g. when we might have more than one page).

Training mode

A boolean field is present on the res.company model. If it's activated documents should have the mention "Documento emitido para fins de Formação". And indicate in the header the data identifying the software developer company (Odoo) instead of the customer’s company.

Links

Release files for odoo-addon-l10n-pt-certification 18.0.1.0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for odoo-addon-l10n-pt-certification 18.0.1.0.0.7
File Interpreter ABI Platform
odoo_addon_l10n_pt_certification-18.0.1.0.0.7-py3-none-any.whl Python 3 none any Details

Release files / odoo_addon_l10n_pt_certification-18.0.1.0.0.7-py3-none-any.whl

Download URL odoo_addon_l10n_pt_certification-18.0.1.0.0.7-py3-none-any.whl
Size 93.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
87fcabc1f81881dcb0b7c831f18b098481ba9c409a7c841623311b78d3fd4e7e
BLAKE2b-256 checksum
How to use checksums
be34f623250eb45266b12b0b431a085ba78967fb59247bf1ae786cc2c7ba7a4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

18.0.1.0.0.7 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page