OdooWiki OCA HUB

ITA - Fattura elettronica - Supporto PEC

l10n_it_fatturapa_pec folder_open OCA/l10n-italy open_in_new
Localization/Italy License: AGPL-3

Italiano

Questo modulo consente di inviare e ricevere i file XML della fattura elettronica versione 1.2

via PEC.

Analizza le notifiche provenienti dallo SdI e monitora lo stato della trasmissione.

English

This module allows you to send and receive electronic invoice/bill XML files version 1.2

via PEC.

Notifications from ES are parsed and transmission state is tracked.

auto_awesome What this module does

AI-generated from the code · Odoo 16.0

Send and receive Italian electronic invoices (FatturaPA) through a certified email (PEC) mailbox, and automatically track the delivery status reported by the Italian Exchange System (SdI).

This module adds a PEC option to the electronic invoice channels used for Italian FatturaPA. On the SDI channel you can choose the outgoing PEC mail server and the incoming PEC mailbox, and set the Exchange System email address. The first time you send an invoice, Odoo automatically uses the official first-contact address sdi01@pec.fatturapa.it; after the first sending it clears that address and expects you to enter the address that SdI assigns to your company.

  • Outgoing: invoices are sent as PEC emails with the XML attached, and the invoice record is marked as sent with date and user.
  • Incoming: a scheduled mailbox check reads PEC messages, recognises SdI notifications and incoming supplier invoices, and creates the corresponding records.
  • Status tracking: delivery receipts, acceptance, rejection and error notifications update the invoice state and store the last SdI response.
  • Error handling: if a PEC mailbox cannot be processed, the configured contacts are notified by email; after too many failures (default 5) the mailbox is reset to draft.

It touches sdi.channel, fatturapa.attachment.out, fatturapa.attachment.in, fetchmail.server, ir.mail_server, res.company and res.config.settings. Settings appear in Accounting configuration and in the email server forms.

Models and fields (7)
  • mail.thread · extends an existing model
  • res.company · extends an existing modelemail_exchange_system (Exchange System Email Address), email_from_for_fatturaPA (Sender Email Address)
  • sdi.channel · extends an existing modelchannel_type, pec_server_id (Outgoing PEC server), first_invoice_sent (SDI already assigned a PEC address to my company), fetch_pec_server_id (Incoming PEC server), email_exchange_system (Exchange System Email Address)
  • ir.mail_server · extends an existing modelis_fatturapa_pec (E-invoice PEC server), email_from_for_fatturaPA (Sender Email Address)
  • fetchmail.server · extends an existing modelpec_error_count (PEC error count), is_fatturapa_pec (E-invoice PEC server), last_pec_error_message (Last PEC Error Message), e_inv_notify_partner_ids (Contacts to notify)
  • res.config.settings · extends an existing modelemail_exchange_system (Exchange System Email Address), email_from_for_fatturaPA (Sender Email Address)
  • fatturapa.attachment.out · extends an existing model

Text generated by AI (DeepSeek) from reading the Odoo 16.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 3 confirmed, 6 with no information of 9 versions.

Sources · Odoo 12.0

Confirmed on 2026-11-03 in branch 12.0 of OCA/l10n-italy.

terminal Installation and usage

OCA documentation · Odoo 16.0

Italiano

Consultare il modulo l10n_it_sdi_channel.

Creare un nuovo canale di tipo PEC (unico supportato per ora) e indicare:

  • Il server PEC da utilizzare per inviare/ricevere attraverso lo SdI
  • La email PEC dello SdI, inizialmente uguale a

Dopo il primo invio, lo SdI risponderà segnalando l'indirizzo da utilizzare per gli invii successivi, da inserire nella configurazione del server PEC dedicato.

Nella configurazione del server smtp, sezione "PEC e fattura elettronica", selezionare la casella "Server PEC e-fattura".

Indicare quindi la email da usare per l'invio e la ricezione, solitamente è uguale al nome utente di connessione (può essere diversa in casi particolari).

È preferibile avere una email dedicata solo alla fatturazione elettronica, in quanto i messaggi di altro tipo non possono essere gestiti da Odoo (verrebbero marcati comunque come letti).

Se si usano altri server SMTP per l'invio di email non PEC, è necessario aumentare la loro priorità rispetto a quella del server PEC.

Lo stato dell'esportazione XML può essere forzato impostando 'Permettere di forzare lo stato dell'esportazione e-fattura' nelle impostazioni tecniche dell'utente.

Per ogni azienda, in

Contabilità → Configurazione → Impostazioni → Fatture elettroniche

specificare l'utente che sarà utilizzato come creatore delle e-fatture fornitore create dalla PEC.

English

See l10n_it_sdi_channel module.

Create a new PEC channel type (the only one supported right now) and indicate:

  • PEC server to be used for sending to/receiving from ES
  • ES PEC email, initially equal to

After sending the first email, ES will reply indicating the address to use for all the others, to be entered in dedicated PEC server configuration.

In smtp server configuration, select 'E-invoice PEC server' in 'PEC and Electronic Invoice' section.

Then specify the email to use for sending and receiving, it is usually equal to connection username (can be different in special cases).

It would be better to have a dedicated email for electronic invoicing, because other kind of messages can't be managed by Odoo (they would be marked as seen).

If you use other SMTP servers for non-PEC email sending, you need to increase their priority as compared to PEC server one.

XML export state can ba forced setting 'Allow to force the supplier e-bill export state' in user's technical settings.

For every company, in

Accounting → Configuration → Settings → Electronic Invoices

set the user who will be used as creator of supplier e-bill automatically created from PEC.

Italiano

Nell'allegato fattura elettronica in uscita fare clic sul pulsante "Invia con PEC".

Le fatture elettroniche fornitore vengono create in modo automatico, prelevate dalla casella PEC.

English

In electronic invoice out attachment you can click "Send Via PEC" button.

Supplier electronic bills are automatically created, fetched from PEC mailbox.

No verified information in OCA: Installation.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.