Repository
OCA/l10n-italy · module folder · Try on Runboat
Module version
1.5.8
Category
Localization/Italy
Folder size
0.73 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/l10n-italyl10n_it_fatturapa_in
Last tracking update
2026-08-07 08:09:16
Authors
Odoo Community Association (OCA), Agile Business Group, Innoviu
Maintainers
Odoo Community Association (OCA), Agile Business Group, Innoviu
Committers
eLBati, Francesco Ballerini, micheledic, matteoopenf, Simone Rubino, Weblate, OCA-git-bot, oca-ci, Alessandro Uffreduzzi, Marco Colombo, Borruso, LorenzoC0, Alessandro Fiorino, TennyMKT, Salvo Rapisarda, Patrick Trabocchi, andrea.m.piovesana
Odoo dependencies
Python dependencies
asn1crypto, elementpath, xmlschema, codicefiscale
System dependencies
None
Required by
l10n_it_fatturapa_export_zip, l10n_it_fatturapa_import_zip, l10n_it_fatturapa_in_purchase, l10n_it_fatturapa_in_rc, l10n_it_fatturapa_out_rc, l10n_it_fatturapa_pec, l10n_it_fatturapa_sdicoop, l10n_it_sdi_channel
Description
**Italiano**

Questo modulo consente di importare i file XML della fattura elettronica
versione 1.2

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

ricevuti attraverso il Sistema di Interscambio (SdI).

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

**English**

This module allows to import Electronic Bill XML files version 1.2

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

received through the Exchange System (ES).

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

Code Analysis

Views touched (12)
XML IDNameModelTypeStatus
discount_rise_price_tree discount.rise.price.tree discount.rise.price tree New
einvoice_line_other_data_tree einvoice.line.other.data.tree einvoice.line.other.data tree New
fatturapa_article_code_tree fatturapa.article.code.tree fatturapa.article.code tree New
view_account_config_settings_ftpa_in view_account_config_settings_ftpa_in res.config.settings Inherits l10n_it_fatturapa.view_account_config_settings
view_fatturapa_in_attachment_form fatturapa.attachment.in.form fatturapa.attachment.in form Inherits l10n_it_fatturapa.fatturapa_attachment_view_form
view_fatturapa_in_attachment_search fatturapa.attachment.in.search fatturapa.attachment.in search New
view_fatturapa_in_attachment_tree fatturapa.attachment.in.tree fatturapa.attachment.in tree New
view_invoice_form_fatturapa_in account.invoice.fatturapa_in account.move form Inherits account.view_move_form
view_invoice_line_form_fatturapa_in account.move.fatturapa.in account.move form Inherits account.view_move_form
view_partner_form_fatturapa_in partner.form.fatturapa.in res.partner form Inherits l10n_it_fatturapa.view_partner_form_fatturapa
wizard_import_fatturapa_form_view Electronic Bill Import wizard.import.fatturapa form New
wizard_link_supplier_invoice wizard_link_supplier_invoice wizard.link.to.invoice form New
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (13)

New fields (12)
  • e_invoice_amount_tax Monetary
    readonly=True string='E-Invoice Tax Amount'
  • e_invoice_amount_total Monetary
    readonly=True string='E-Invoice Total Amount'
  • e_invoice_amount_untaxed Monetary
    readonly=True string='E-Invoice Untaxed Amount'
  • e_invoice_date_invoice Date
    readonly=True string='E-invoice date'
  • e_invoice_force_validation Boolean
    string='Force E-Invoice Validation'
  • e_invoice_line_ids One2many → einvoice.line
    copy=False readonly=True string='Lines Detail' args: 'einvoice.line', 'invoice_id'
  • e_invoice_received_date Date
    string='E-Bill Received Date'
  • e_invoice_reference Char
    readonly=True string='E-invoice vendor reference'
  • e_invoice_validation_error Boolean
    compute='_compute_e_invoice_validation_error'
  • e_invoice_validation_message Text
    compute='_compute_e_invoice_validation_error'
  • fatturapa_attachment_in_id Many2one → fatturapa.attachment.in
    copy=False ondelete='restrict' args: 'fatturapa.attachment.in', 'E-bill Import File'
  • inconsistencies Text
    copy=False args: 'Import Inconsistencies'
Public methods (12)
  • action_post(self)
  • compute_xml_amount_tax(self, DatiRiepilogo)
    @api.model
  • compute_xml_amount_total(self, FatturaBody, amount_untaxed, amount_tax)
    @api.model
  • compute_xml_amount_untaxed(self, FatturaBody)
    @api.model
  • e_inv_check_amount_tax(self)
  • e_inv_check_amount_total(self)
  • e_inv_check_amount_untaxed(self)
  • e_inv_dati_ritenuta(self)
  • name_get(self)
  • process_negative_lines(self)
  • remove_attachment_link(self)
  • set_einvoice_data(self, fattura)

New fields (1)
  • fatturapa_attachment_in_id Many2one → fatturapa.attachment.in
    readonly=True related='move_id.fatturapa_attachment_in_id' args: 'fatturapa.attachment.in', 'E-bill Import File'
Public methods (0)

No public methods.

New fields (1)
  • e_invoice_line_id Many2one → einvoice.line
    readonly=True args: 'einvoice.line', 'Related E-bill Line'
Public methods (0)

No public methods.

New fields (17)
  • admin_ref Char
    readonly=True args: 'Administration Reference'
  • cod_article_ids One2many → fatturapa.article.code
    readonly=True args: 'fatturapa.article.code', 'e_invoice_line_id', 'Articles Code'
  • discount_rise_price_ids One2many → discount.rise.price
    readonly=True args: 'discount.rise.price', 'e_invoice_line_id', 'Discount and Supplement Details'
  • invoice_id Many2one → account.move
    ondelete='cascade' readonly=True args: 'account.move', 'Bill'
  • line_number Integer
    readonly=True
  • name Char
    readonly=True args: 'Description'
  • other_data_ids One2many → einvoice.line.other.data
    readonly=True string='Other Administrative Data' args: 'einvoice.line.other.data', 'e_invoice_line_id'
  • period_end_date Date
    readonly=True
  • period_start_date Date
    readonly=True
  • qty Float
    digits='Product Unit of Measure' readonly=True args: 'Quantity'
  • service_type Char
    readonly=True args: 'Sale Provision Type'
  • tax_amount Float
    readonly=True args: 'VAT Rate'
  • tax_kind Char
    readonly=True args: 'Nature'
  • total_price Float
    readonly=True
  • unit_price Float
    digits='Product Price' readonly=True
  • uom Char
    readonly=True args: 'Unit of measure'
  • wt_amount Char
    readonly=True args: 'Tax Withholding'
Public methods (0)

No public methods.

New fields (5)
  • date_ref Char
    readonly=True args: 'Date Reference'
  • e_invoice_line_id Many2one → einvoice.line
    readonly=True args: 'einvoice.line', 'Related E-bill Line'
  • name Char
    readonly=True args: 'Data Type'
  • num_ref Float
    readonly=True args: 'Number Reference'
  • text_ref Char
    readonly=True args: 'Text Reference'
Public methods (0)

No public methods.

New fields (3)
  • code_val Char
    args: 'Code Value'
  • e_invoice_line_id Many2one → einvoice.line
    readonly=True args: 'einvoice.line', 'Related E-bill Line'
  • name Char
    args: 'Code Type'
Public methods (0)

No public methods.

New fields (16)
  • discount_decimal_digits Integer
    help='Value used during import of this e-invoice to override "Discount" precision.' readonly=True string='Discounts decimal digits'
  • e_invoice_parsing_error Text
    compute='_compute_e_invoice_parsing_error' store=True
  • e_invoice_received_date Datetime
    string='E-Bill Received Date'
  • e_invoice_validation_error Boolean
    compute='_compute_e_invoice_validation_error'
  • e_invoice_validation_message Text
    compute='_compute_e_invoice_validation_error'
  • in_invoice_ids One2many → account.move
    readonly=True string='In Bills' args: 'account.move', 'fatturapa_attachment_in_id'
  • inconsistencies Text
    compute='_compute_xml_data' store=True
  • invoices_date Char
    compute='_compute_xml_data' store=True string='Invoices date'
  • invoices_number Integer
    compute='_compute_xml_data' store=True args: 'Bills Number'
  • invoices_total Float
    compute='_compute_xml_data' help='If specified by supplier, total amount of the document net of any discount and including tax charged to the buyer/ordered' store=True args: 'Bills Total'
  • is_self_invoice Boolean
    compute='_compute_is_self_invoice' store=True args: 'Contains self invoices'
  • linked_invoice_id_xml Char
    compute='_compute_linked_invoice_id_xml' store=True
  • price_decimal_digits Integer
    help='Value used during import of this e-invoice to override "Product Price" precision.' readonly=True string='Prices decimal digits'
  • quantity_decimal_digits Integer
    help='Value used during import of this e-invoice to override "Product Unit of Measure" precision.' readonly=True string='Quantities decimal digits'
  • registered Boolean
    compute='_compute_registered' store=True
  • xml_supplier_id Many2one → res.partner
    compute='_compute_xml_data' store=True string='Supplier' args: 'res.partner'
Public methods (3)
  • extract_attachments(self, AttachmentsData, invoice_id)
  • get_invoice_obj(self)
    Parse the invoice into a lxml.etree.ElementTree object. If the parsing goes wrong: - log the error - save the parsing error in field `e_invoice_parsing_error` - return `False` :rtype: lxml.etree.ElementTree or bool.
  • recompute_xml_fields(self)

New fields (6)
  • arrotondamenti_attivi_account_id Many2one → account.account
    domain=[('deprecated', '=', False)] help='Account used to round up bills amount.' args: 'account.account', 'Round Up Account'
  • arrotondamenti_passivi_account_id Many2one → account.account
    domain=[('deprecated', '=', False)] help='Account used to round down bills amount.' args: 'account.account', 'Round Down Account'
  • arrotondamenti_tax_id Many2one → account.tax
    domain=[('type_tax_use', '=', 'purchase'), ('amount', '=', 0.0)] help='Tax used to both round up and down bills amount.' args: 'account.tax', 'Rounding Tax'
  • cassa_previdenziale_product_id Many2one → product.product
    help='Product used to model DatiCassaPrevidenziale XML element on bills.' args: 'product.product', 'Welfare Fund Data Product'
  • in_invoice_registration_date Selection
    default='inv_date' string='Vendor invoice registration default date' args: [('inv_date', 'Invoice Date'), ('rec_date', 'Received Date')]
  • sconto_maggiorazione_product_id Many2one → product.product
    help='Product used to model ScontoMaggiorazione XML element on bills.' args: 'product.product', 'Discount Supplement Product'
Public methods (0)

No public methods.

New fields (6)
  • arrotondamenti_attivi_account_id Many2one
    readonly=False related='company_id.arrotondamenti_attivi_account_id'
  • arrotondamenti_passivi_account_id Many2one
    readonly=False related='company_id.arrotondamenti_passivi_account_id'
  • arrotondamenti_tax_id Many2one
    readonly=False related='company_id.arrotondamenti_tax_id'
  • cassa_previdenziale_product_id Many2one
    readonly=False related='company_id.cassa_previdenziale_product_id'
  • in_invoice_registration_date Selection
    readonly=False related='company_id.in_invoice_registration_date'
  • sconto_maggiorazione_product_id Many2one
    readonly=False related='company_id.sconto_maggiorazione_product_id'
Public methods (0)

No public methods.

New fields (5)
  • e_invoice_default_product_id Many2one → product.product
    comodel_name='product.product' help='Used by electronic invoice XML import. If filled in, generated bill lines will use this product when no other possible product is found.' string='E-bill Default Product'
  • e_invoice_detail_level Selection
    default='2' help='Minimum level: Bill is created with no lines; User will have to create them, according to what specified in the electronic bill.\nTax rate level: Rate level: an invoice line is created for each rate present in the electronic invoice\nMaximum level: every line contained in the electronic bill will create a line in the bill.' required=True string='E-bills Detail Level' args: [('0', 'Minimum'), ('1', 'Tax Rate'), ('2', 'Maximum')]
  • e_invoice_discount_decimal_digits Integer
    default=-1 help='Decimal digits used for discount field. See "prices decimal digits". -1 to use the default precision' args: 'E-bills discounts decimal digits'
  • e_invoice_price_decimal_digits Integer
    default=-1 help='Decimal digits used in prices computation. This is needed to correctly import e-invoices with many decimal digits, not being forced to increase decimal digits of all your prices. Otherwise, increase "Product Price" precision. -1 to use the default precision' args: 'E-bills prices decimal digits'
  • e_invoice_quantity_decimal_digits Integer
    default=-1 help='Decimal digits used for quantity field. See "prices decimal digits". -1 to use the default precision' args: 'E-bills quantities decimal digits'
Public methods (1)
  • check_vat(self)
    @api.constrains('vat', 'country_id')

New fields (4)
  • discount_decimal_digits Integer
    help='Decimal digits used for discount field. See "Prices decimal digits".' required=True args: 'Discounts decimal digits'
  • e_invoice_detail_level Selection
    help='Minimum level: Bill is created with no lines; User will have to create them, according to what specified in the electronic bill.\nTax rate level: Rate level: an invoice line is created for each rate present in the electronic invoice\nMaximum level: every line contained in the electronic bill will create a line in the bill.' required=True string='E-bills Detail Level' args: [('0', 'Minimum'), ('1', 'Tax rate'), ('2', 'Maximum')]
  • price_decimal_digits Integer
    help='Decimal digits used in prices computation. This is needed to correctly import e-invoices with many decimal digits, not being forced to increase decimal digits of all your prices. Otherwise, increase "Product Price" precision.' required=True args: 'Prices decimal digits'
  • quantity_decimal_digits Integer
    help='Decimal digits used for quantity field. See "Prices decimal digits".' required=True args: 'Quantities decimal digits'
Public methods (37)
  • CountryByCode(self, CountryCode)
  • ProvinceByCode(self, provinceCode)
  • adjust_accounting_data(self, product, line_vals)
  • check_invoice_amount(self, invoice, FatturaElettronicaBody)
  • check_partner_base_data(self, partner_id, DatiAnagrafici)
  • create_and_get_line_id(self, invoice_line_ids, invoice_line_model, upd_vals)
  • create_e_invoice_line(self, line)
  • default_get(self, fields_list)
    @api.model
  • getCarrirerPartner(self, Carrier)
  • getCedPrest(self, cedPrest)
  • getPartnerBase(self, DatiAnagrafici)
  • get_account_taxes(self, AliquotaIVA, Natura)
  • get_credit_account(self, product=None)
    Try to get default credit account for invoice line looking in 1) product (if provided) 2) journal 3) company default. :param product: Product whose expense account will be used :return: The account found
  • get_inconsistencies(self)
    Get all existing inconsistencies.
  • get_journal(self, company)
  • get_line_product(self, line, partner)
  • importFatturaPA(self)
  • invoiceCreate(self, fatt, fatturapa_attachment, FatturaBody, partner_id)
  • log_inconsistency(self, message)
    Add `message` to existing inconsistencies. Note that inconsistencies are in all environments.
  • reset_inconsistencies(self)
    Clean all existing inconsistencies. Note that inconsistencies are in all environments.
  • set_StabileOrganizzazione(self, CedentePrestatore, invoice)
  • set_activity_progress(self, FatturaBody, invoice)
  • set_art73(self, FatturaBody, invoice_data)
  • set_attachments_data(self, FatturaBody, invoice)
  • set_ddt_data(self, FatturaBody, invoice)
  • set_delivery_data(self, FatturaBody, invoice)
  • set_e_invoice_lines(self, FatturaBody, invoice_data)
  • set_efatt_rounding(self, FatturaBody, invoice)
  • set_invoice_line_ids(self, FatturaBody, credit_account_id, partner, wt_founds, invoice)
  • set_parent_invoice_data(self, FatturaBody, invoice)
  • set_payments_data(self, FatturaBody, invoice, partner_id)
  • set_roundings(self, FatturaBody, invoice)
  • set_summary_data(self, FatturaBody, invoice)
  • set_vehicles_data(self, FatturaBody, invoice)
  • set_vendor_bill_data(self, FatturaBody, invoice)
  • set_welfares_fund(self, FatturaBody, credit_account_id, invoice, wt_founds)
  • set_withholding_tax(self, FatturaBody, invoice_data)

New fields (2)
  • attachment_id Many2one → fatturapa.attachment.in
    comodel_name='fatturapa.attachment.in'
  • line_ids One2many → wizard.link.to.invoice.line
    comodel_name='wizard.link.to.invoice.line' inverse_name='wizard_id'
Public methods (2)
  • default_get(self, fields_list)
    @api.model
  • link(self)

New fields (4)
  • e_invoice_descr Text
    readonly=True string='E-bill description'
  • e_invoice_nbr Integer
    readonly=True string='Bill number in XML'
  • invoice_id Many2one → account.move
    comodel_name='account.move'
  • wizard_id Many2one → wizard.link.to.invoice
    comodel_name='wizard.link.to.invoice'
Public methods (1)
  • link(self)

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…