ITA - Fattura elettronica - Supporto Fatturhello

l10n_it_fatturapa_fatturhello
REPOSITORY
REPOSITORYOCA/l10n-italy
GIT
GIThttps://github.com/OCA/l10n-italy.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-italy/tree/16.0/l10n_it_fatturapa_fatturhello
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYLocalization/Italy
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), PyTech
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), PyTech
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, Simone Rubino, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-italy
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:11:58
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/account-financial-reporting:
    - account_tax_balance
OCA/account-financial-tools:
    - account_fiscal_year
OCA/l10n-italy:
    - l10n_it_sdi_channel
    - l10n_it_fatturapa
    - l10n_it_account
    - l10n_it_fiscalcode
    - l10n_it_ipa
    - l10n_it_rea
    - l10n_it_account_tax_kind
    - l10n_it_vat_payability
    - l10n_it_fiscal_payment_term
    - l10n_it_fatturapa_in
    - l10n_it_fiscal_document_type
    - l10n_it_withholding_tax_reason
    - l10n_it_withholding_tax
    - l10n_it_payment_reason
    - l10n_it_fatturapa_out
OCA/partner-contact:
    - partner_firstname
OCA/server-ux:
    - date_range
odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - attachment_indexation
    - base_iban
    - base_vat
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES asn1crypto
xmlschema
codicefiscale
elementpath
unidecode
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
**Italiano**

Questo modulo consente di inviare e ricevere i file XML della
fattura elettronica tramite Fatturhello (https://fatturhello.it).

La ricezione avviene periodicamente, tramite il CRON "Importazione e-fatture da Fatturhello".
Ad ogni esecuzione tutte le fatture elettroniche successive a quella configurata (a meno di duplicati) verranno scaricate.

La documentazione delle API è https://documenter.getpostman.com/view/3340600/RWTiyLCz.

**English**

This module allows you to send and receive electronic
invoice/bill XML files via Fatturhello (https://fatturhello.it).

The receipt happens periodically, with the CRON "Import E-Bills from Fatturhello".
During each execution all the E-Bills subsequent the configured one (except for duplicates) will be downloaded.

The API documentation is https://documenter.getpostman.com/view/3340600/RWTiyLCz.

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
fatturhello_login_view_form Login to Fatturhello for view l10n_it_fatturapa_fatturhello.login form New
view_company_form_e_invoice_sdi Add Fatturhello fields to Company form res.company field Inherits l10n_it_sdi_channel.view_company_form_e_invoice_sdi
view_fatturapa_out_attachment_form Add fatturhello fields to Electronic Invoice form view fatturapa.attachment.out notebook Inherits l10n_it_fatturapa_out.view_fatturapa_out_attachment_form
view_fatturapa_out_attachment_search Add fatturhello fields to Electronic Invoice search view fatturapa.attachment.out search Inherits l10n_it_fatturapa_out.view_fatturapa_out_attachment_search
view_sdi_channel_form Add Fatturhello fields to SdI channel form sdi.channel header Inherits l10n_it_sdi_channel.view_sdi_channel_form
Models touched (6)

New fields (1)
  • fatturapa_state Selection
    selection_add=[('sent_to_fatturhello', 'Sent to Fatturhello'), ('sent')]
Public methods (0)

No public methods.

New fields (3)
  • fatturhello_last_processed_status_datetime Datetime
    help='All the status updates more recent than this date will be processed.\nIf empty, all the status updates will be processed.' string='Last processed Fatturhello status'
  • fatturhello_protocol Char
    help='Identifier assigned during upload to Fatturhello.' readonly=True
  • state Selection
    ondelete={'sent_to_fatturhello': 'set default'} selection_add=[('sent_to_fatturhello', 'Sent to Fatturhello'), ('sent')]
Public methods (1)
  • get_file_vat(self)
    @api.model

New fields (0)

No new fields.

Public methods (6)
  • download_file(self, base_url, session_token, company_identifier, file_identifier)
    Download a file from a company. :param company_identifier: The identifier of the Company in Fatturhello owning the file. :param file_identifier: The identifier of the file to be downloaded.
  • get_e_bills_list(self, base_url, session_token, company_identifier, last_downloaded_e_bill_identifer=None)
    Get the list of identifiers of E-Bills to be downloaded. E-Bills are ordered from the oldest to the latest one. :param company_identifier: The identifier of the Company in Fatturhello owning the E-Bills. :param last_downloaded_e_bill_identifer: Identifier of the downloaded E-Bill. If provided, only the identifiers of the E-Bills more recent than the specified one will be dowloaded.
  • get_e_invoice_status_list(self, base_url, session_token, company_identifier, file_identifier)
    Get all the status updates of `file_identifier`. The statuses are ordered from oldest to latest.
  • get_secrets(self, url, company, username, password)
    Get secrets used to authenticate API calls.
  • get_session_token(self, url, authtoken)
    Get session token for single API call authentication.
  • upload_e_invoice(self, base_url, session_token, company_identifier, e_invoice)
    Upload an e-invoice for a company. :param company_identifier: The identifier of the Company where the file will be uploaded.

New fields (3)
  • channel_id Many2one → sdi.channel
    comodel_name='sdi.channel' default=<expr> domain=[('channel_type', '=', 'fatturhello')] required=True
  • password Char
    required=True
  • username Char
    compute='_compute_username' readonly=False required=True store=True
Public methods (2)
  • confirm(self)
    Login and save the returned token in `channel_id`.
  • onchange_channel(self)
    @api.onchange('channel_id')
    Check channel configuration.

New fields (2)
  • fatturhello_identifier Char
    help='Identifier of this company in Fatturhello, set automatically during login.' readonly=True
  • fatturhello_last_downloaded_e_bill_identifer Char
    help="Fatturhello's protocol number of the last E-Bill downloaded.\nAll the E-Bills subsequent this one will be downloaded during the CRON execution.\nIf empty, all the E-Bills in Fatturhello will be downloaded."
Public methods (0)

No public methods.

New fields (5)
  • channel_type Selection
    ondelete={'fatturhello': 'cascade'} selection_add=[('fatturhello', 'Fatturhello')]
  • fatturhello_base_url Char
    default='https://app.b2beasy.it' name='Fatturhello base URL'
  • fatturhello_login_authtoken Char
    help='Token can only be set during login. Login again to update the token.' readonly=True
  • fatturhello_login_authtoken_create_date Date
    readonly=True
  • fatturhello_username Char
    help='Username can only be set during login.' readonly=True
Public methods (2)
  • fatturhello_action_login(self)
    Action to open the login wizard.
  • send_via_fatturhello(self, attachment_out_ids)
    Send the e-invoices `attachment_out_ids` using Fatturhello.