OdooWiki OCA HUB

ITA - Fattura elettronica - Supporto PEC

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

Italiano

Questo modulo implementa il canale PEC (Posta Elettronica Certificata) per la comunicazione con il Sistema di Interscambio (SdI), in alternativa al proxy IAP standard di Odoo.

Si basa su l10n_it_edi_sdi per la logica condivisa di elaborazione delle notifiche e ricezione delle fatture, aggiungendo il trasporto specifico via PEC.

Funzionalità principali:

  • Invio fatture elettroniche via PEC al SdI
  • Ricezione email PEC dal SdI e instradamento ai gestori appropriati
  • Gestione errori PEC con notifica automatica ai contatti configurati e disabilitazione del server dopo ripetuti fallimenti
  • Configurazione server SMTP e IMAP/POP3 dedicati alla PEC

English

This module implements the PEC (Certified Email) transport channel for communication with the Italian Exchange System (SdI), as an alternative to Odoo's standard IAP proxy.

It builds on l10n_it_edi_sdi for the shared notification processing and invoice reception logic, adding PEC-specific transport.

Main features:

  • Send electronic invoices to SdI via PEC
  • Receive PEC emails from SdI and route to appropriate handlers
  • PEC error handling with automatic notification to configured contacts and server auto-disable after repeated failures
  • Dedicated SMTP and IMAP/POP3 server configuration for PEC

auto_awesome What this module does

AI-generated from the code · Odoo 18.0

Lets Italian companies send and receive electronic invoices through a PEC (certified email) mailbox instead of Odoo's standard proxy, with automatic error notifications and server disabling after repeated failures.

This module adds a PEC (certified email) channel for Italian electronic invoicing. When enabled for a company, invoices are sent as XML attachments by email to the Exchange System (SdI) address instead of going through Odoo's usual proxy service.

In Settings, under the Italian e-invoicing section, a new "PEC Channel" option lets you switch this on and choose an outgoing PEC mail server, an incoming PEC mail server and the SdI PEC email address. The outgoing and incoming server screens gain an "E-invoice PEC server" checkbox; the outgoing server also needs a PEC sender address.

Incoming PEC messages are read by the scheduled mail fetch. Invoices and SdI notifications are routed to the existing Italian e-invoicing processing. Delivery and acceptance receipts (subjects starting with CONSEGNA or ACCETTAZIONE) are simply posted as messages on the matching invoice. A message that cannot be linked to an invoice raises an error and stays unread in the mailbox for manual review.

On the incoming server you can list contacts to notify when a PEC message fails. The last error and an error counter are shown on the server form. After more failures than the configured limit (default 5), the server is automatically reset to draft and the contacts are emailed.

On an invoice, the check button triggers a fetch of the PEC mailbox instead of polling the proxy.

Models and fields (6)
  • mail.thread · extends an existing model
  • res.company · extends an existing modell10n_it_edi_use_pec (Use PEC for e-invoicing), l10n_it_edi_pec_server_id (Outgoing PEC server), l10n_it_edi_pec_fetch_server_id (Incoming PEC server), l10n_it_edi_pec_email_exchange_system (SDI PEC Email Address)
  • account.move · extends an existing model
  • ir.mail_server · extends an existing modelis_l10n_it_edi_pec (E-invoice PEC server), l10n_it_edi_pec_email_from (PEC Sender Email Address)
  • fetchmail.server · extends an existing modelpec_error_count (PEC error count), is_l10n_it_edi_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 modell10n_it_edi_use_pec, l10n_it_edi_pec_server_id, l10n_it_edi_pec_fetch_server_id, l10n_it_edi_pec_email_exchange_system

Text generated by AI (DeepSeek) from reading the Odoo 18.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: 1 confirmed, 8 with no information of 9 versions.

Sources · Odoo 18.0

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

terminal Installation and usage

OCA documentation · Odoo 18.0

Italiano

  • Configurare un server SMTP in uscita per la PEC:
  • Andare in Impostazioni → Tecnico → Server di posta in uscita
  • Creare un nuovo server con i parametri del provider PEC
  • Spuntare "E-invoice PEC server"
  • Inserire l'indirizzo email PEC mittente
  • Configurare un server di posta in ingresso per la PEC:
  • Andare in Impostazioni → Tecnico → Server di posta in ingresso
  • Creare un nuovo server IMAP o POP3 con i parametri del provider PEC
  • Spuntare "E-invoice PEC server"
  • Configurare i contatti da notificare in caso di errore
  • Abilitare il canale PEC per l'azienda:
  • Andare in Impostazioni → Contabilità → Fatturazione elettronica
  • Spuntare "Use PEC for e-invoicing"
  • Selezionare i server PEC in uscita e in ingresso
  • Inserire l'indirizzo PEC del SdI
  • Il parametro di sistema fetchmail.pec.max.retry (default: 5) controlla il numero massimo di errori consecutivi prima che il server di posta in ingresso venga disabilitato automaticamente. Modificare il valore in Impostazioni → Tecnico → Parametri → Parametri di sistema se necessario.

English

  • Configure an outgoing PEC SMTP server:
  • Go to Settings → Technical → Outgoing Mail Servers
  • Create a new server with your PEC provider parameters
  • Check "E-invoice PEC server"
  • Enter the PEC sender email address
  • Configure an incoming PEC mail server:
  • Go to Settings → Technical → Incoming Mail Servers
  • Create a new IMAP or POP3 server with your PEC provider parameters
  • Check "E-invoice PEC server"
  • Configure contacts to notify on errors
  • Enable PEC channel for the company:
  • Go to Settings → Accounting → Italian Electronic Invoicing
  • Check "Use PEC for e-invoicing"
  • Select the outgoing and incoming PEC servers
  • Enter the SdI PEC email address
  • The system parameter fetchmail.pec.max.retry (default: 5) controls the maximum number of consecutive errors before the incoming mail server is automatically disabled. Change its value in Settings → Technical → Parameters → System Parameters if needed.

Italiano

Invio fatture

Le fatture vengono inviate al SdI tramite PEC quando si utilizza il normale flusso di invio fattura elettronica di Odoo. Il modulo intercetta l'invio e usa la PEC al posto del proxy IAP standard.

Ricezione notifiche

Le notifiche dal SdI vengono ricevute automaticamente tramite il cron di fetchmail. Lo stato della fattura viene aggiornato automaticamente in base alla notifica ricevuta:

  • RC (Ricevuta di Consegna) → Inoltrata al destinatario
  • NS (Notifica di Scarto) → Rifiutata
  • MC (Mancata Consegna) → Inoltro al destinatario fallito
  • NE (Notifica Esito) → Accettata/Rifiutata dal partner PA
  • DT (Decorrenza Termini) → Accettata per decorrenza termini

Ricezione fatture passive

Le fatture dei fornitori inviate tramite SdI vengono ricevute automaticamente via PEC e importate come fatture in bozza.

Verifica manuale stato

Il pulsante "Controlla Invio" sulla fattura inviata avvia una lettura manuale della casella PEC per recuperare eventuali notifiche in attesa.

English

Sending invoices

Invoices are sent to SdI via PEC when using Odoo's standard electronic invoice sending flow. The module intercepts the send and uses PEC instead of the standard IAP proxy.

Receiving notifications

SdI notifications are received automatically via the fetchmail cron. The invoice state is updated automatically based on the notification received:

  • RC (Delivery Receipt) → Forwarded to recipient
  • NS (Rejection) → Rejected
  • MC (Failed Delivery) → Forward to recipient failed
  • NE (Outcome Notification) → Accepted/Rejected by PA partner
  • DT (Deadline Expiry) → Accepted after term expiry

Receiving vendor bills

Vendor bills sent through SdI are automatically received via PEC and imported as draft invoices.

Manual status check

The "Check Sending" button on a sent invoice triggers a manual PEC mailbox read to retrieve any pending notifications.

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.