Repository
OCA/l10n-italy · module folder · Try on Runboat
Module version
1.1.2
Category
Hidden
Folder size
0.12 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/l10n-italy
Last tracking update
2026-08-07 08:09:16
Authors
Odoo Community Association (OCA), Efatto.it di Sergio Corato
Maintainers
Odoo Community Association (OCA), Efatto.it di Sergio Corato
Committers
eLBati, micheledic, Simone Rubino, Weblate, OCA-git-bot, oca-ci, Alessandro Uffreduzzi, Borruso
Odoo dependencies
Python dependencies
asn1crypto, xmlschema, codicefiscale, elementpath, unidecode
System dependencies
None
Required by
l10n_it_fatturapa_fatturhello, l10n_it_fatturapa_pec, l10n_it_fatturapa_sdicoop
Description
**Italiano**

Questo modulo aggiunge alcuni campi, utili come prerequisito per inviare
file XML e ZIP delle fatture elettroniche

<http://www.fatturapa.gov.it/export/fatturazione/it/normativa/f-2.htm>

tramite email PEC, WEB API oppure SFTP al Sistema di Interscambio (SdI).

<http://www.fatturapa.gov.it/export/fatturazione/it/sdi.htm>

**English**

This module add some useful fields as a pre-requisite to send XML and
ZIP files of electronic invoices

<http://www.fatturapa.gov.it/export/fatturazione/en/normativa/f-2.htm>

through mail PEC, WEB API or SFTP to the Exchange System (ES).

<http://www.fatturapa.gov.it/export/fatturazione/en/sdi.htm>

Code Analysis

Views touched (7)
XML IDNameModelTypeStatus
view_account_config_settings view_account_config_settings res.config.settings Inherits l10n_it_fatturapa.view_account_config_settings
view_company_form_e_invoice_sdi view_company_form_e_invoice_sdi res.company form Inherits l10n_it_fatturapa.view_company_form_e_invoice
view_fatturapa_out_attachment_form Add SdI channel fields to Electronic Invoice fatturapa.attachment.out form Inherits l10n_it_fatturapa_out.view_fatturapa_out_attachment_form
view_invoice_form_fatturapa Add SdI channel edits to invoice's form view account.move form Inherits l10n_it_fatturapa_out.view_invoice_form_fatturapa
view_sdi_channel_form view_sdi_channel_form sdi.channel form New
view_sdi_channel_tree view_sdi_channel_tree sdi.channel tree New
wizard_fatturapa_send_to_sdi_view Form view of wizard to send multiple e-invoice to SdI wizard.fatturapa.send_to_sdi form New
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (7)

New fields (0)

No new fields.

Public methods (1)
  • action_open_export_send_sdi(self)
    Validate, export and send to SdI the invoices.

New fields (2)
  • channel_id Many2one → sdi.channel
    comodel_name='sdi.channel' related='company_id.sdi_channel_id' store=True
  • channel_type Selection
    readonly=True related='channel_id.channel_type'
Public methods (0)

No public methods.

New fields (1)
  • last_sdi_response Text
    default='No response yet' readonly=True string='Last Response from Exchange System'
Public methods (1)
  • send_to_sdi(self)

New fields (3)
  • e_invoice_user_id Many2one → res.users
    comodel_name='res.users' default=<expr> help='This user will be used at supplier e-bill creation.' string='E-bill creator'
  • sdi_channel_id Many2one → sdi.channel
    string='ES channel' args: 'sdi.channel'
  • sdi_channel_type Selection
    readonly=True related='sdi_channel_id.channel_type'
Public methods (0)

No public methods.

New fields (4)
  • e_invoice_user_id Many2one
    readonly=False related='company_id.e_invoice_user_id'
  • group_sdi_channel_validate_send Boolean
    help='Allow users to validate, export and send invoices to SdI in one click.' implied_group='l10n_it_sdi_channel.res_groups_validate_send' string='Validate, export and send invoices'
  • sdi_channel_id Many2one
    readonly=False related='company_id.sdi_channel_id' string='ES channel'
  • sdi_channel_type Selection
    readonly=True related='sdi_channel_id.channel_type'
Public methods (0)

No public methods.

New fields (3)
  • channel_type Selection
    help='Channels (Pec, Web, Sftp) could be provided by external modules.' required=True selection=[] string='ES channel type'
  • company_id Many2one → res.company
    default=<expr> required=True string='Company' args: 'res.company'
  • name Char
    required=True translate=True
Public methods (3)
  • receive_fe(self, file_name_content_dict, metadata_file_name_content_dict, **default_values)
    @api.model
    Save Electronic Bills received from SdI. Note that saving the Electronic Bills does not depend on the channel record; if any channel-specific value has to be saved in the records, it can be added in `default_values`. :param file_name_content_dict: Dictionary mapping file names to their content for each Electronic Bill. :param metadata_file_name_content_dict: Dictionary mapping file names to their content for each Metadata file. :param default_values: Default values for the creation of Electronic Bill. :return: the created Electronic Bills (`fatturapa.attachment.in`).
  • receive_notification(self, response_name_content_dict)
    @api.model
    Find and update the Electronic Invoices referenced by SdI notifications. Note that updating the Electronic Invoices does not depend on the channel record. :param response_name_content_dict: Dictionary mapping file names to their content (bytes) for each SdI notification. :return: the updated Electronic Invoices (`fatturapa.attachment.out`).
  • send(self, attachment_out_ids)
    Send `attachment_out_ids` to SdI. Each channel will define a method send_via_<channel_type>. The method will receive a recordset of Electronic Invoice (`fatturapa.attachment.out`) that have to be sent to SdI. The method will take care of updating the state of each Electronic Invoice that has managed to send.

New fields (0)

No new fields.

Public methods (1)
  • send_to_sdi(self)

Loading…

Loading…

Loading…

Loading…

Loading…