Pec Messages

l10n_it_pec_messages
REPOSITORY
REPOSITORYOCA/l10n-italy
GIT
GIThttps://github.com/OCA/l10n-italy.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-italy/tree/7.0/l10n_it_pec_messages
VERSION
VERSION 1.0
CATEGORY
CATEGORYCertified Mailing
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Agile Business Group
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Agile Business Group
COMMITTERS
COMMITTERSLorenzo Battistini, eLBati, Stéphane Bidoul (ACSONE), OCA Transbot, zeroincombenze, archetipo, thinkstudio, angedras, Alessio Gerace
WEBSITE
WEBSITEhttp://www.agilebg.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:07:14
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/l10n-italy:
    - l10n_it_pec
odoo/odoo:
    - fetchmail
    - mail
    - base
    - base_setup
    - web_kanban
    - web
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Pec Messages Management
-----------------------

This module allows to correctly parse PEC messages.
According to 'daticert.xml' file, it identifies the message type and other
message data.
'consegna', 'accettazione' and the other notification messages are linked to
the original message that originated them.
It also correctly parses the mail attachments and attaches the original 'eml'
PEC message.
The module adds a 'PEC' menu where to handle PEC messages.


Configuration
-------------

Create a new user associated to the PEC mailbox.
Set 'Never' for 'Receive Messages by Email'.
Configure the fetchmail server (incoming mail server, IMAP or POP)
used to fetch PEC messages and set it as 'PEC'.
Set the users allowed to use that server.
Configure the 'outgoing mail server' (SMTP) used for PEC and set it as 'PEC'.
Link the outgoing mail server to the 'incoming PEC server'.
Add your user to 'PEC reader' group.


Contributors
------------

 - Alessio Gerace <alessio.gerace@gmail.com>
 - Lorenzo Battistini <lorenzo.battistini@agilebg.com>
 - Roberto Onnis <roberto.onnis@innoviu.com>

Code Analysis

Views touched (9)
XML IDNameModelTypeStatus
email_compose_message_wizard_form_pec mail.compose.message.form.pec mail.compose.message form New
ir_mail_server_form_pec ir.mail_server.form.pec ir.mail_server field Inherits base.ir_mail_server_form
message_pec_form message.pec.form mail.message form New
message_pec_partner_tree res.partner.pec.tree res.partner tree New
message_pec_tree message.pec.tree mail.message tree New
pec_message_search_view message.search.form mail.message search New
view_document_file_protocol_form_pec fetchmail.server.form.pec fetchmail.server field Inherits fetchmail.view_email_server_form
view_message_form_pec mail.message.form.pec mail.message field Inherits mail.view_message_form
view_user_form_pec res.users.form.pec res.users notebook Inherits base.view_users_form
Models touched (9)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (2)
  • get_message_data(self, cr, uid, message_id, context=None)
  • send_mail(self, cr, uid, ids, context=None)
    Override of send_mail to duplicate attachments linked to the email.template. Indeed, basic mail.compose.message wizard duplicates attachments in mass mailing mode. But in 'single post' mode, attachments of an email template also have to be duplicated to avoid changing their ownership.

New fields (0)

No new fields.

Public methods (3)
  • create(self, cr, uid, values, context=None)
    when replying to a PEC message, or sending a new PEC message, use the linked SMTP server and SMTP user
  • send(self, cr, uid, ids, auto_commit=False, recipient_ids=None, context=None)
  • send_get_email_dict(self, cr, uid, mail, partner=None, context=None)

New fields (0)

No new fields.

Public methods (2)
  • CheckNotificationStatus(self, cr, uid, ids, context=None)
  • check_access_rule(self, cr, uid, ids, operation, context=None)

New fields (0)

No new fields.

Public methods (1)
  • get_partners_to_notify(self, cr, uid, message, partners_to_notify=None, context=None)
    this allows to send PEC mail to partners without standard email

New fields (0)

No new fields.

Public methods (4)
  • force_create_partner(self, cr, uid, context=None)
  • is_server_pec(self, cr, uid, context=None)
  • message_parse(self, cr, uid, message, save_original=False, context=None)
  • parse_daticert(self, cr, uid, daticert, context=None)

New fields (0)

No new fields.

Public methods (2)
  • message_post(self, cr, uid, thread_id, body='', subject=None, type='notification', subtype=None, parent_id=False, attachments=None, context=None, content_subtype='html', **kwargs)
    if pec_type is accettazione and non-accettazione link message as reception type in parent message if pec_type is avvenuta-consegna errore-consegna rilevazione-virus link message as delivery type in parent message if pec_type is error type like: non-accettazione errore-consegna rilevazione-virus marks parent message with error flag
  • name_get(self, cr, uid, ids, context=None)

New fields (0)

No new fields.

Public methods (0)

No public methods.