Repository
OCA/l10n-italy · module folder · Try on Runboat
Module version
1.1.2
Category
Accounting
Folder size
0.17 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/l10n-italy
Last tracking update
2026-08-07 08:42:51
Authors
Odoo Community Association (OCA), Nextev Srl
Maintainers
Odoo Community Association (OCA), Nextev Srl
Committers
micheledic, Weblate, OCA-git-bot, oca-ci, matteo.tognini, odooNextev
Odoo dependencies
Python dependencies
openupgradelib, cryptography
System dependencies
None
Required by
None
Description
**English**

This module extends the functionality of l10n_it_edi_doi, enabling the
use of the Declaration of Intent (Dichiarazione di Intento) for incoming
vendor bills and purchase orders.

Key features:
 - Support for multiple Declarations of Intent per invoice
 - Dedicated tab in invoice form for managing DOI associations
 - Automatic validation of DOI amounts and available thresholds
 - Smart warnings when invoice amounts don't match DOI coverage
 - Backward compatibility with single-declaration workflow

**Italiano**

Questo modulo estende la funzionalità di l10n_it_edi_doi, permettendo
l'utilizzo della Dichiarazione di Intento per le fatture di acquisto in
ingresso e gli ordini di acquisto.

Caratteristiche principali:
 - Supporto per dichiarazioni di intento multiple per fattura
 - Tab dedicato nel form fattura per gestire le associazioni DOI
 - Validazione automatica degli importi e soglie disponibili
 - Avvisi intelligenti quando gli importi non corrispondono
 - Retrocompatibilità con il flusso a dichiarazione singola

Code Analysis

Views touched (7)
XML IDNameModelTypeStatus
declaration_of_intent_search Search view for declaration_of_intent l10n_it_edi_doi.declaration_of_intent search Inherits l10n_it_edi_doi.view_l10n_it_edi_doi_declaration_of_intent_search
res_company_bills_doi_tax res.company.bills.doi.tax res.company form Inherits base.view_company_form
view_l10n_it_edi_doi_form_type l10n_it_edi_doi.declaration_of_intent_type.form.inherit l10n_it_edi_doi.declaration_of_intent form Inherits l10n_it_edi_doi.view_l10n_it_edi_doi_form
view_l10n_it_edi_doi_tree l10n_it_edi_doi.declaration_of_intent.list.inherit l10n_it_edi_doi.declaration_of_intent list Inherits l10n_it_edi_doi.view_l10n_it_edi_doi_tree
view_move_form_doi_hide_header account.move.doi.hide.header account.move form Inherits l10n_it_edi_doi.view_move_form
view_move_form_doi_tab account.move.doi.tab account.move form Inherits account.view_move_form
view_purchase_order_form purchase.order.form purchase.order form Inherits purchase.purchase_order_form
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (6)

New fields (4)
  • doi_type Selection
    compute='_compute_l10n_it_edi_doi_type' args: [('in', 'Issued from company'), ('out', 'Received from customers')]
  • l10n_it_edi_doi_count Integer
    compute='_compute_l10n_it_edi_doi_count' string='DOI Count'
  • l10n_it_edi_doi_ids One2many → account.move.doi
    help="Multiple declarations of intent linked to this invoice. Use this when the invoice amount exceeds a single declaration's threshold." string='Declarations of Intent' args: 'account.move.doi', 'move_id'
  • l10n_it_edi_doi_total_amount Monetary
    compute='_compute_l10n_it_edi_doi_total_amount' help='Total amount covered by all linked declarations of intent.' string='Total DOI Amount'
Public methods (1)
  • action_open_declaration_of_intent(self)
    Open declaration(s) of intent. If there are multiple declarations, open a list view. If there's only one, open its form view.

New fields (14)
  • amount Monetary
    currency_field='currency_id' help='Amount of the invoice covered by this declaration of intent. If zero, the full remaining amount will be used.'
  • company_id Many2one
    related='move_id.company_id' store=True
  • currency_id Many2one
    related='move_id.currency_id' store=True
  • declaration_available Monetary
    compute='_compute_declaration_available' string='Available'
  • declaration_end_date Date
    related='declaration_id.end_date' string='End Date'
  • declaration_id Many2one → l10n_it_edi_doi.declaration_of_intent
    ondelete='restrict' required=True string='Declaration of Intent' args: 'l10n_it_edi_doi.declaration_of_intent'
  • declaration_invoiced Monetary
    related='declaration_id.invoiced' string='Already Invoiced'
  • declaration_issue_date Date
    related='declaration_id.issue_date' string='Issue Date'
  • declaration_start_date Date
    related='declaration_id.start_date' string='Start Date'
  • declaration_threshold Monetary
    related='declaration_id.threshold' string='Threshold'
  • move_id Many2one → account.move
    index=True ondelete='cascade' required=True string='Invoice' args: 'account.move'
  • protocol_number_part1 Char
    related='declaration_id.protocol_number_part1' string='Protocol 1'
  • protocol_number_part2 Char
    related='declaration_id.protocol_number_part2' string='Protocol 2'
  • sequence Integer
    default=10
Public methods (3)
  • create(self, vals_list)
    @api.model_create_multi
  • unlink(self)
  • write(self, vals)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (4)
  • move_doi_ids One2many → account.move.doi
    copy=False help='Links to invoices using this declaration with specific amounts.' readonly=True string='Invoice Declaration Lines' args: 'account.move.doi', 'declaration_id'
  • number Char
    copy=False help='Sequential number for internal reference'
  • purchase_order_ids One2many → purchase.order
    copy=False readonly=True string='Purchase / Rfq Orders' args: 'purchase.order', 'l10n_it_edi_doi_id'
  • type Selection
    default='out' required=True args: [('in', 'Issued from company'), ('out', 'Received from customers')]
Public methods (1)
  • create(self, vals_list)
    @api.model_create_multi

New fields (5)
  • l10n_it_edi_doi_date Date
    compute='_compute_l10n_it_edi_doi_date' string='Date on which Declaration of Intent is applied'
  • l10n_it_edi_doi_id Many2one → l10n_it_edi_doi.declaration_of_intent
    comodel_name='l10n_it_edi_doi.declaration_of_intent' compute='_compute_l10n_it_edi_doi_id' precompute=True readonly=False store=True string='Declaration of Intent'
  • l10n_it_edi_doi_not_yet_invoiced Monetary
    compute='_compute_l10n_it_edi_doi_not_yet_invoiced' help='Total under the Declaration of Intent of thisdocument that can still be invoiced' readonly=True store=True string='Declaration of Intent Amount Not Yet Invoiced'
  • l10n_it_edi_doi_use Boolean
    compute='_compute_l10n_it_edi_doi_use' string='Use Declaration of Intent'
  • l10n_it_edi_doi_warning Text
    compute='_compute_l10n_it_edi_doi_warning' string='Declaration of Intent Threshold Warning'
Public methods (4)
  • action_open_declaration_of_intent(self)
    Open declaration of intent. Note: Purchase orders only support a single declaration, but we check for consistency with the invoice multi-declaration approach.
  • action_rfq_send(self)
  • button_confirm(self)
  • copy_data(self, default=None)

New fields (1)
  • l10n_it_edi_doi_bill_tax_id Many2one → account.tax
    comodel_name='account.tax' string='Declaration of Intent Bills Tax'
Public methods (0)

No public methods.

Status
Open migration PR — not merged yet for this version
CI status
green — ready to merge
Open since
195 days ago
Last activity
64 days ago
Repository
OCA/l10n-italy
Pull request
[19.0][MIG] l10n_it_edi_doi_extension: Migration to 19.0 (#5082)