Declaration of Intent for Italy (OCA)

l10n_it_edi_doi_extension
REPOSITORY
REPOSITORYOCA/l10n-italy
GIT
GIThttps://github.com/OCA/l10n-italy.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-italy/tree/18.0/l10n_it_edi_doi_extension
VERSION
VERSION 1.1.1
CATEGORY
CATEGORYAccounting
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Nextev Srl
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Nextev Srl
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, micheledic, oca-ci, matteo.tognini, odooNextev
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-italy
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:12
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - l10n_it_edi_doi
    - l10n_it_edi
    - l10n_it
    - account
    - base_setup
    - base
    - web
    - onboarding
    - product
    - mail
    - bus
    - web_tour
    - html_editor
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - base_iban
    - base_vat
    - account_edi_proxy_client
    - certificate
    - sale
    - sales_team
    - account_payment
    - payment
    - utm
    - purchase
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES cryptography
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
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 (6)
XML IDNameModelTypeStatus
declaration_of_intent_search Search view for declaration_of_intent l10n_it_edi_doi.declaration_of_intent xpath 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 field Inherits base.view_company_form
view_l10n_it_edi_doi_form_type l10n_it_edi_doi.declaration_of_intent_type.form l10n_it_edi_doi.declaration_of_intent field Inherits l10n_it_edi_doi.view_l10n_it_edi_doi_form
view_move_form_doi_hide_header account.move.doi.hide.header account.move xpath Inherits l10n_it_edi_doi.view_move_form
view_move_form_doi_tab account.move.doi.tab account.move xpath Inherits account.view_move_form
view_purchase_order_form purchase.order.form purchase.order div Inherits purchase.purchase_order_form
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 (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (3)
  • 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'
  • 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 (0)

No public methods.

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
STATUSOpen migration PR - not merged yet for this version
REPOSITORY
REPOSITORYOCA/l10n-italy
PULL REQUEST
PULL REQUEST[19.0][MIG] l10n_it_edi_doi_extension: Migration to 19.0 (#5082)