19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:31:28 +01:00
parent ff721d030e
commit 7721452493
1826 changed files with 124775 additions and 274114 deletions

View file

@ -12,38 +12,15 @@ pip install odoo-bringout-oca-ocb-l10n_it_edi_doi
## Dependencies
This addon depends on:
- l10n_it_edi
- sale
## Manifest Information
- **Name**: Italy - Declaration of Intent
- **Version**: 0.1
- **Category**: Accounting/Localizations
- **License**: LGPL-3
- **Installable**: False
## Source
Based on [OCA/OCB](https://github.com/OCA/OCB) branch 16.0, addon `l10n_it_edi_doi`.
- Repository: https://github.com/OCA/OCB
- Branch: 19.0
- Path: addons/l10n_it_edi_doi
## License
This package maintains the original LGPL-3 license from the upstream Odoo project.
## Documentation
- Overview: doc/OVERVIEW.md
- Architecture: doc/ARCHITECTURE.md
- Models: doc/MODELS.md
- Controllers: doc/CONTROLLERS.md
- Wizards: doc/WIZARDS.md
- Reports: doc/REPORTS.md
- Security: doc/SECURITY.md
- Install: doc/INSTALL.md
- Usage: doc/USAGE.md
- Configuration: doc/CONFIGURATION.md
- Dependencies: doc/DEPENDENCIES.md
- Troubleshooting: doc/TROUBLESHOOTING.md
- FAQ: doc/FAQ.md
This package preserves the original LGPL-3 license.

View file

@ -1,59 +1,13 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import models
from . import wizard
from odoo import api, SUPERUSER_ID
import logging
_logger = logging.getLogger(__name__)
def _l10n_it_edi_doi_post_init(cr, registry):
""" Update existing companies that have the Italian Chart of Accounts set """
env = api.Environment(cr, SUPERUSER_ID, {})
chart_template = env.ref('l10n_it.l10n_it_chart_template_generic', raise_if_not_found=False)
if chart_template:
for company in env['res.company'].search([('chart_template_id', '=', chart_template.id)]):
_logger.info("Company %s already has the Italian localization installed, updating...", company.name)
# Create the declaration of intent fiscal position
doi_fp_template = env.ref('l10n_it_edi_doi.declaration_of_intent_fiscal_position')
doi_fp_vals = ((doi_fp_template, chart_template._get_fp_vals(company, doi_fp_template)),)
doi_fp = chart_template._create_records_with_xmlid('account.fiscal.position', doi_fp_vals, company)
# Create the declaration of intent tax
doi_tax_template = env.ref('l10n_it_edi_doi.00di')
tax_template_ref = doi_tax_template._generate_tax(company)['tax_template_to_tax']
doi_tax = tax_template_ref[doi_tax_template]
doi_tax.write({
'l10n_it_has_exoneration': True,
'l10n_it_kind_exoneration': 'N3.5',
'l10n_it_law_reference': 'art. 8, c. 1, lett. c) D.P.R. 633/1972',
})
# Create the fiscal position tax mappings
# Add all the taxes needed for the fiscal position to `tax_template_ref`
for tax_template_id, external_xml_id in doi_fp_template.tax_ids.tax_src_id.get_external_id().items():
tax_template = env['account.tax.template'].browse(tax_template_id)
module, xml_id = external_xml_id.split('.')
tax = env.ref('%s.%s_%s' % (module, company.id, xml_id), raise_if_not_found=False)
if tax:
tax_template_ref[tax_template] = tax
# Gather all the info for the tax mappings
doi_fp_tax_template_vals = []
for tax in doi_fp_template.tax_ids:
tax_src_id = tax_template_ref.get(tax.tax_src_id)
tax_dest_id = tax_template_ref.get(tax.tax_dest_id)
if tax_src_id is None or tax_dest_id is None:
continue
doi_fp_tax_template_vals.append((tax, {
'tax_src_id': tax_src_id.id,
'tax_dest_id': tax_dest_id.id or False,
'position_id': doi_fp.id,
}))
chart_template._create_records_with_xmlid('account.fiscal.position.tax', doi_fp_tax_template_vals, company)
# Set the info on the company
company.l10n_it_edi_doi_tax_id = doi_tax
company.l10n_it_edi_doi_fiscal_position_id = doi_fp
def _l10n_it_edi_doi_post_init(env):
for company in env['res.company'].search([('chart_template', '=', 'it'), ('parent_id', '=', False)]):
template = env['account.chart.template'].with_company(company)
template._load_data({
'account.tax': template._get_it_edi_doi_account_tax(),
'account.fiscal.position': template._get_it_edi_doi_account_fiscal_position(),
'res.company': template._get_it_edi_doi_res_company(),
})

View file

@ -1,6 +1,7 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Italy - Declaration of Intent',
'countries': ['it'],
'version': '0.1',
'depends': [
'l10n_it_edi',
@ -10,11 +11,9 @@
Add support for the Declaration of Intent (Dichiarazione di Intento) to the Italian localization.
""",
'category': 'Accounting/Localizations',
'website': 'https://www.odoo.com/documentation/17.0/applications/finance/fiscal_localizations/italy.html',
'website': 'https://www.odoo.com/documentation/latest/applications/finance/fiscal_localizations/italy.html',
'data': [
'security/ir.model.access.csv',
'data/account_tax_template.xml',
'data/account_fiscal_position_template_data.xml',
'data/invoice_it_template.xml',
'views/l10n_it_edi_doi_declaration_of_intent_views.xml',
'views/account_move_views.xml',
@ -23,6 +22,7 @@
'views/sale_ir_actions_report_templates.xml',
'views/sale_order_views.xml',
],
'author': 'Odoo S.A.',
'license': 'LGPL-3',
'post_init_hook': '_l10n_it_edi_doi_post_init',
}

View file

@ -1,35 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="declaration_of_intent_fiscal_position" model="account.fiscal.position.template">
<field name="sequence">10</field>
<field name="name">Declaration of Intent</field>
<field name="chart_template_id" ref="l10n_it.l10n_it_chart_template_generic"/>
<field name="auto_apply" eval="False" />
<field name="vat_required" eval="False" />
<field name="note">Not taxable (art. 8, c. 1, lett. c) D.P.R. 633/1972) letter intent</field>
</record>
<record id="afpttn_declaration_of_intent_fiscal_position_1" model="account.fiscal.position.tax.template">
<field name="position_id" ref="declaration_of_intent_fiscal_position"/>
<field name="tax_src_id" ref="l10n_it.22v"/>
<field name="tax_dest_id" ref="00di"/>
</record>
<record id="afpttn_declaration_of_intent_fiscal_position_2" model="account.fiscal.position.tax.template">
<field name="position_id" ref="declaration_of_intent_fiscal_position"/>
<field name="tax_src_id" ref="l10n_it.10v"/>
<field name="tax_dest_id" ref="00di"/>
</record>
<record id="afpttn_declaration_of_intent_fiscal_position_3" model="account.fiscal.position.tax.template">
<field name="position_id" ref="declaration_of_intent_fiscal_position"/>
<field name="tax_src_id" ref="l10n_it.5v"/>
<field name="tax_dest_id" ref="00di"/>
</record>
<record id="afpttn_declaration_of_intent_fiscal_position_4" model="account.fiscal.position.tax.template">
<field name="position_id" ref="declaration_of_intent_fiscal_position"/>
<field name="tax_src_id" ref="l10n_it.4v"/>
<field name="tax_dest_id" ref="00di"/>
</record>
</odoo>

View file

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="00di" model="account.tax.template">
<field name="description">Declaration of Intent</field>
<field name="chart_template_id" ref="l10n_it.l10n_it_chart_template_generic"/>
<field name="name">0% E</field>
<field name="sequence">950</field>
<field name="amount">0.0</field>
<field name="amount_type">percent</field>
<field name="type_tax_use">sale</field>
<field name="price_include">False</field>
<field name="tax_group_id" ref="l10n_it.tax_group_fuori"/>
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'repartition_type': 'base',
'plus_report_expression_ids': [ref('l10n_it.tax_report_line_vp2_tag')],
}),
(0,0, {'repartition_type': 'tax'}),
]"/>
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'repartition_type': 'base',
'minus_report_expression_ids': [ref('l10n_it.tax_report_line_vp2_tag')],
}),
(0,0, {'repartition_type': 'tax'}),
]"/>
</record>
</odoo>

View file

@ -0,0 +1,2 @@
"id","name","sequence","auto_apply","vat_required","country_id","country_group_id","name@it","note","note@it"
"declaration_of_intent_fiscal_position","Declaration of Intent","10","0","0","","","Dichiarazione di Intento","Not taxable (art. 8, c. 1, lett. c) D.P.R. 633/1972) letter intent","Non imponibile (art. 8, c. 1, lett. c) D.P.R. 633/1972) Lettera intento"
1 id name sequence auto_apply vat_required country_id country_group_id name@it note note@it
2 declaration_of_intent_fiscal_position Declaration of Intent 10 0 0 Dichiarazione di Intento Not taxable (art. 8, c. 1, lett. c) D.P.R. 633/1972) letter intent Non imponibile (art. 8, c. 1, lett. c) D.P.R. 633/1972) Lettera intento

View file

@ -0,0 +1,5 @@
"id","description","invoice_label","name","sequence","amount","amount_type","type_tax_use","tax_group_id","active","tax_scope","repartition_line_ids/repartition_type","repartition_line_ids/document_type","repartition_line_ids/tag_ids","repartition_line_ids/account_id","repartition_line_ids/factor_percent","name@it","children_tax_ids","l10n_it_exempt_reason","invoice_legal_notes","description@it","fiscal_position_ids","original_tax_ids"
"00di","Declaration of Intent","0%","0% E","950","0.0","percent","sale","tax_group_fuori","","","base","invoice","02","","","","","N3.5","art. 8, c. 1, lett. c) D.P.R. 633/1972","","declaration_of_intent_fiscal_position","10v,5v,4v,22v"
"","","","","","","","","","","","tax","invoice","","","","","","","","","",""
"","","","","","","","","","","","base","refund","02","","","","","","","","",""
"","","","","","","","","","","","tax","refund","","","","","","","","","",""
1 id description invoice_label name sequence amount amount_type type_tax_use tax_group_id active tax_scope repartition_line_ids/repartition_type repartition_line_ids/document_type repartition_line_ids/tag_ids repartition_line_ids/account_id repartition_line_ids/factor_percent name@it children_tax_ids l10n_it_exempt_reason invoice_legal_notes description@it fiscal_position_ids original_tax_ids
2 00di Declaration of Intent 0% 0% E 950 0.0 percent sale tax_group_fuori base invoice 02 N3.5 art. 8, c. 1, lett. c) D.P.R. 633/1972 declaration_of_intent_fiscal_position 10v,5v,4v,22v
3 tax invoice
4 base refund 02
5 tax refund

View file

@ -1,19 +1,24 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_it_edi_doi
# * l10n_it_edi_doi
#
# Weblate <noreply-mt-weblate@weblate.org>, 2025.
# "Marianna Ciofani (cima)" <cima@odoo.com>, 2025.
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-06-11 09:25+0000\n"
"PO-Revision-Date: 2024-06-11 09:25+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"POT-Creation-Date: 2026-03-06 19:06+0000\n"
"PO-Revision-Date: 2025-11-19 16:32+0000\n"
"Last-Translator: \"Marianna Ciofani (cima)\" <cima@odoo.com>\n"
"Language-Team: Italian <https://translate.odoo.com/projects/odoo-19-l10n/"
"l10n_it_edi_doi/it/>\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.12.2\n"
#. module: l10n_it_edi_doi
#: model_terms:ir.ui.view,arch_db:l10n_it_edi_doi.view_l10n_it_edi_doi_form
@ -23,7 +28,7 @@ msgstr "<span class=\"o_form_label mx-3\"> al </span>"
#. module: l10n_it_edi_doi
#: model_terms:ir.ui.view,arch_db:l10n_it_edi_doi.view_l10n_it_edi_doi_form
msgid "<span class=\"o_form_label mx-3\">/</span>"
msgstr ""
msgstr "<span class=\"o_form_label mx-3\">/</span>"
#. module: l10n_it_edi_doi
#: model_terms:ir.ui.view,arch_db:l10n_it_edi_doi.view_l10n_it_edi_doi_form
@ -53,9 +58,7 @@ msgstr "<span class=\"o_stat_text\">Ordini di vendita</span>"
#. module: l10n_it_edi_doi
#. odoo-python
#: code:addons/l10n_it_edi_doi/models/account_move.py:0
#: code:addons/l10n_it_edi_doi/models/sale_order.py:0
#, python-format
msgid "A line using tax %s should not contain any other taxes"
msgstr "Una riga che utilizza la tassa %s non deve contenere altre tasse"
@ -131,6 +134,11 @@ msgstr "Azienda"
msgid "Contact"
msgstr "Contatto"
#. module: l10n_it_edi_doi
#: model:ir.model,website_form_label:l10n_it_edi_doi.model_res_partner
msgid "Create a Customer"
msgstr "Crea cliente"
#. module: l10n_it_edi_doi
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_l10n_it_edi_doi_declaration_of_intent__create_uid
msgid "Created by"
@ -164,7 +172,6 @@ msgstr "Data di Emissione"
#. module: l10n_it_edi_doi
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_bank_statement_line__l10n_it_edi_doi_date
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_move__l10n_it_edi_doi_date
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_payment__l10n_it_edi_doi_date
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_sale_order__l10n_it_edi_doi_date
msgid "Date on which Declaration of Intent is applied"
msgstr "Data di applicazione della Dichiarazione di Intento"
@ -178,7 +185,6 @@ msgstr "Data di emissione della Dichiarazione di Intento"
#: model:ir.model,name:l10n_it_edi_doi.model_l10n_it_edi_doi_declaration_of_intent
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_bank_statement_line__l10n_it_edi_doi_id
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_move__l10n_it_edi_doi_id
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_payment__l10n_it_edi_doi_id
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_sale_order__l10n_it_edi_doi_id
#: model_terms:ir.ui.view,arch_db:l10n_it_edi_doi.view_account_invoice_filter
#: model_terms:ir.ui.view,arch_db:l10n_it_edi_doi.view_sales_order_filter
@ -188,7 +194,6 @@ msgstr "Dichiarazione di Intento"
#. module: l10n_it_edi_doi
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_bank_statement_line__l10n_it_edi_doi_amount
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_move__l10n_it_edi_doi_amount
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_payment__l10n_it_edi_doi_amount
msgid "Declaration of Intent Amount"
msgstr "Dichiarazione di Intento Importo"
@ -210,7 +215,6 @@ msgstr "Dichiarazione di Intento Imposta"
#. module: l10n_it_edi_doi
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_bank_statement_line__l10n_it_edi_doi_warning
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_move__l10n_it_edi_doi_warning
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_payment__l10n_it_edi_doi_warning
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_sale_order__l10n_it_edi_doi_warning
msgid "Declaration of Intent Threshold Warning"
msgstr "Dichiarazione di Intento Avviso di soglia"
@ -219,19 +223,24 @@ msgstr "Dichiarazione di Intento Avviso di soglia"
#. odoo-python
#: code:addons/l10n_it_edi_doi/models/account_move.py:0
#: code:addons/l10n_it_edi_doi/models/sale_order.py:0
#, python-format
msgid "Declaration of Intent for %s"
msgstr "Dichiarazione di Intento per %s"
#. module: l10n_it_edi_doi
#. odoo-python
#: code:addons/l10n_it_edi_doi/models/res_partner.py:0
#, python-format
msgid "Declaration of Intent of %s"
msgstr "Dichiarazione di Intento di %s"
#. module: l10n_it_edi_doi
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_chart_template__display_name
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_fiscal_position__display_name
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_move__display_name
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_tax__display_name
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_l10n_it_edi_doi_declaration_of_intent__display_name
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_res_company__display_name
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_res_partner__display_name
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_sale_order__display_name
msgid "Display Name"
msgstr "Nome Visualizzato"
@ -241,6 +250,11 @@ msgstr "Nome Visualizzato"
msgid "Draft"
msgstr "Bozza"
#. module: l10n_it_edi_doi
#: model:ir.model,name:l10n_it_edi_doi.model_account_tax
msgid "ETA tax codes mixin"
msgstr "Mixin codici fiscali ETA"
#. module: l10n_it_edi_doi
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_l10n_it_edi_doi_declaration_of_intent__end_date
msgid "End Date"
@ -282,13 +296,12 @@ msgstr "Icona Font Awesome es. fa-tasks"
#. odoo-python
#: code:addons/l10n_it_edi_doi/models/account_move.py:0
#: code:addons/l10n_it_edi_doi/models/sale_order.py:0
#, python-format
msgid ""
"Given the tax %s is applied, there should be a Declaration of Intent "
"selected."
msgstr ""
"Data l'applicazione dell'imposta %s, dovrebbe esserci una Dichiarazione di Intento "
"selezionata."
"Data l'applicazione dell'imposta %s, dovrebbe esserci una Dichiarazione di "
"Intento selezionata."
#. module: l10n_it_edi_doi
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_l10n_it_edi_doi_declaration_of_intent__has_message
@ -296,7 +309,14 @@ msgid "Has Message"
msgstr "Contiene messaggio"
#. module: l10n_it_edi_doi
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_chart_template__id
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_fiscal_position__id
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_move__id
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_tax__id
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_l10n_it_edi_doi_declaration_of_intent__id
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_res_company__id
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_res_partner__id
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_sale_order__id
msgid "ID"
msgstr "ID"
@ -331,11 +351,6 @@ msgstr "Data fattura"
msgid "Invoiced"
msgstr "Fatturato"
#. module: l10n_it_edi_doi
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_sale_order_line__qty_invoiced_posted
msgid "Invoiced Quantity (posted)"
msgstr "Quantità fatturata (confermata)"
#. module: l10n_it_edi_doi
#: model_terms:ir.ui.view,arch_db:l10n_it_edi_doi.view_move_tree
msgid "Invoices"
@ -349,7 +364,6 @@ msgstr "Fatture / Rimborsi"
#. module: l10n_it_edi_doi
#. odoo-python
#: code:addons/l10n_it_edi_doi/models/declaration_of_intent.py:0
#, python-format
msgid "Invoices using Declaration of Intent %s"
msgstr "Fatture con Dichiarazione di Intento %s"
@ -398,6 +412,11 @@ msgstr "Messaggi"
msgid "My Activity Deadline"
msgstr "Scadenza mie attività"
#. module: l10n_it_edi_doi
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_l10n_it_edi_doi_declaration_of_intent__activity_calendar_event_id
msgid "Next Activity Calendar Event"
msgstr "Prossimo evento del calendario delle attività"
#. module: l10n_it_edi_doi
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_l10n_it_edi_doi_declaration_of_intent__activity_date_deadline
msgid "Next Activity Deadline"
@ -456,13 +475,14 @@ msgstr "Partner"
#. module: l10n_it_edi_doi
#. odoo-python
#: code:addons/l10n_it_edi_doi/models/declaration_of_intent.py:0
#, python-format
msgid ""
"Pay attention, the threshold of your Declaration of Intent %s of %s is exceeded by %s, this document included.\n"
"Invoiced: %s; Not Yet Invoiced: %s"
"Pay attention, the threshold of your Declaration of Intent %(name)s of %"
"(threshold)s is exceeded by %(exceeded)s, this document included.\n"
"Invoiced: %(invoiced)s; Not Yet Invoiced: %(not_yet_invoiced)s"
msgstr ""
"Attenzione, la soglia della tua Dichiarazione di Intento %s di %s è superata da %s, questo documento incluso.\n"
"Fatturato: %s; Non ancora fatturato: %s"
"Fai attenzione, la soglia della tua dichiarazione di intenti %(name)s di %"
"(threshold)s viene superata del %(exceeded)s, incluso questo documento.\n"
"Fatturato: %(invoiced)s. Non ancora fatturato: %(not_yet_invoiced)s"
#. module: l10n_it_edi_doi
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_l10n_it_edi_doi_declaration_of_intent__protocol_number_part1
@ -479,6 +499,11 @@ msgstr "Protocollo 2"
msgid "Protocol Number"
msgstr "Numero di Protocollo"
#. module: l10n_it_edi_doi
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_l10n_it_edi_doi_declaration_of_intent__rating_ids
msgid "Ratings"
msgstr "Valutazioni"
#. module: l10n_it_edi_doi
#: model_terms:ir.ui.view,arch_db:l10n_it_edi_doi.view_l10n_it_edi_doi_form
msgid "Reactivate"
@ -490,13 +515,13 @@ msgid "Remaining"
msgstr "Rimanente"
#. module: l10n_it_edi_doi
#: model:ir.model.fields,help:l10n_it_edi_doi.field_l10n_it_edi_doi_declaration_of_intent__remaining_amount
#: model:ir.model.fields,help:l10n_it_edi_doi.field_l10n_it_edi_doi_declaration_of_intent__remaining
msgid ""
"Remaining amount after deduction of the Invoiced and Not Yet Invoiced "
"amounts."
msgstr ""
"Importo rimanente dopo la deduzione degli importi Fatturati e Non ancora fatturati "
"importi."
"Importo rimanente dopo la deduzione degli importi Fatturati e Non ancora "
"fatturati importi."
#. module: l10n_it_edi_doi
#: model_terms:ir.ui.view,arch_db:l10n_it_edi_doi.view_l10n_it_edi_doi_form
@ -528,11 +553,6 @@ msgstr "Errore di consegna SMS"
msgid "Sales Order"
msgstr "Ordini di vendita"
#. module: l10n_it_edi_doi
#: model:ir.model,name:l10n_it_edi_doi.model_sale_order_line
msgid "Sales Order Line"
msgstr "Riga ordine di vendita"
#. module: l10n_it_edi_doi
#: model_terms:ir.ui.view,arch_db:l10n_it_edi_doi.view_quotation_tree
msgid "Sales Orders"
@ -546,7 +566,6 @@ msgstr "Ordini di vendita / Preventivi"
#. module: l10n_it_edi_doi
#. odoo-python
#: code:addons/l10n_it_edi_doi/models/declaration_of_intent.py:0
#, python-format
msgid "Sales Orders using Declaration of Intent %s"
msgstr "Ordini di vendita con Dichiarazioni di Intento %s"
@ -588,11 +607,6 @@ msgstr ""
"Oggi: attività in data odierna\n"
"Pianificato: attività future."
#. module: l10n_it_edi_doi
#: model:ir.model,name:l10n_it_edi_doi.model_account_tax
msgid "Tax"
msgstr "Imposta"
#. module: l10n_it_edi_doi
#: model_terms:ir.ui.view,arch_db:l10n_it_edi_doi.view_move_tree
msgid "Tax excluded"
@ -616,52 +630,63 @@ msgstr "Terminato / Revocato"
#. module: l10n_it_edi_doi
#. odoo-python
#: code:addons/l10n_it_edi_doi/models/declaration_of_intent.py:0
#, python-format
msgid "The Declaration of Intent belongs to company %s, not %s."
msgstr "La Dichiarazione di Intento appartiene alla società %s, non a %s."
msgid ""
"The Declaration of Intent belongs to company %(declaration_company)s, not %"
"(company)s."
msgstr ""
"La dichiarazione di intenti appartiene alla società %(declaration_company)s "
"e non a %(company)s."
#. module: l10n_it_edi_doi
#. odoo-python
#: code:addons/l10n_it_edi_doi/models/declaration_of_intent.py:0
#, python-format
msgid "The Declaration of Intent belongs to partner %s, not %s."
msgstr "La Dichiarazione di Intento appartiene al partner %s, non a %s."
msgid ""
"The Declaration of Intent belongs to partner %(declaration_partner)s, not %"
"(partner)s."
msgstr ""
"La dichiarazione di intenti appartiene al partner %(declaration_partner)s e "
"non a %(partner)s."
#. module: l10n_it_edi_doi
#. odoo-python
#: code:addons/l10n_it_edi_doi/models/declaration_of_intent.py:0
#, python-format
msgid "The Declaration of Intent is in draft."
msgstr "La Dichiarazione di Intento è in bozza."
#. module: l10n_it_edi_doi
#. odoo-python
#: code:addons/l10n_it_edi_doi/models/declaration_of_intent.py:0
#, python-format
msgid "The Declaration of Intent is valid from %s to %s, not on %s."
msgstr "La Dichiarazione di Intento è valida dal %s a %s, non il %s."
msgid ""
"The Declaration of Intent is valid from %(start_date)s to %(end_date)s, not "
"on %(date)s."
msgstr ""
"La dichiarazione di intenti è valida dal %(start_date)s al %(end_date)s, non "
"il %(date)s."
#. module: l10n_it_edi_doi
#. odoo-python
#: code:addons/l10n_it_edi_doi/models/declaration_of_intent.py:0
#, python-format
msgid "The Declaration of Intent must be active."
msgstr "La dichiarazione di Intento deve essere attiva."
#. module: l10n_it_edi_doi
#. odoo-python
#: code:addons/l10n_it_edi_doi/models/declaration_of_intent.py:0
#, python-format
msgid "The Declaration of Intent uses currency %s, not %s."
msgstr "La Dichiarazione di Intento utilizza la valuta %s, non %s."
msgid ""
"The Declaration of Intent uses currency %(declaration_currency)s, not %"
"(currency)s."
msgstr ""
"La dichiarazione di intenti usa la valuta %(declaration_currency)s e non %"
"(currency)s."
#. module: l10n_it_edi_doi
#: model:ir.model.constraint,message:l10n_it_edi_doi.constraint_l10n_it_edi_doi_declaration_of_intent_protocol_number_unique
msgid ""
"The Protocol Number of a Declaration of Intent must be unique! Please choose"
" another one."
msgstr "Il numero di protocollo di una Dichiarazione di Intento deve essere univoco! Per favore scegline"
" un altro."
"The Protocol Number of a Declaration of Intent must be unique! Please choose "
"another one."
msgstr ""
"Il numero di protocollo di una Dichiarazione di Intento deve essere univoco! "
"Per favore scegline un altro."
#. module: l10n_it_edi_doi
#: model:ir.model.constraint,message:l10n_it_edi_doi.constraint_l10n_it_edi_doi_declaration_of_intent_threshold_positive
@ -672,16 +697,23 @@ msgstr "La Soglia di una Dichiarazione di Intento deve essere positiva."
#: model:ir.model.fields,help:l10n_it_edi_doi.field_l10n_it_edi_doi_declaration_of_intent__state
msgid ""
"The state of this Declaration of Intent. \n"
"- 'Draft' means that the Declaration of Intent still needs to be confirmed before being usable. \n"
"- 'Draft' means that the Declaration of Intent still needs to be confirmed "
"before being usable. \n"
"- 'Active' means that the Declaration of Intent is usable. \n"
"- 'Terminated' designates that the Declaration of Intent has been marked as not to use anymore without invalidating usages of it. \n"
"- 'Revoked' means the Declaration of Intent should not have been used. You will probably need to revert previous usages of it, if any.\n"
"- 'Terminated' designates that the Declaration of Intent has been marked as "
"not to use anymore without invalidating usages of it. \n"
"- 'Revoked' means the Declaration of Intent should not have been used. You "
"will probably need to revert previous usages of it, if any.\n"
msgstr ""
"Lo stato della presente Dichiarazione di Intento. \n"
"- 'Bozza' significa che la Dichiarazione di Intento deve ancora essere confermata prima di essere utilizzabile. \n"
"- 'Bozza' significa che la Dichiarazione di Intento deve ancora essere "
"confermata prima di essere utilizzabile. \n"
"- 'Attiva' significa che la Dichiarazione di Intento è utilizzabile. \n"
"- 'Terminata' indica che la Dichiarazione di Intento è stata contrassegnata come non più utilizzabile senza invalidarne gli usi. \n"
"- 'Revocata' significa che la Dichiarazione di Intento non deve essere utilizzata. Probabilmente sarà necessario ripristinare gli usi precedenti, se presenti.\n"
"- 'Terminata' indica che la Dichiarazione di Intento è stata contrassegnata "
"come non più utilizzabile senza invalidarne gli usi. \n"
"- 'Revocata' significa che la Dichiarazione di Intento non deve essere "
"utilizzata. Probabilmente sarà necessario ripristinare gli usi precedenti, "
"se presenti.\n"
#. module: l10n_it_edi_doi
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_l10n_it_edi_doi_declaration_of_intent__threshold
@ -699,29 +731,30 @@ msgstr "Totale"
msgid ""
"Total amount of allowed sales without VAT under this Declaration of Intent"
msgstr ""
"Importo totale delle vendite consentite senza IVA ai sensi della presente Dichiarazione di Intento"
"Importo totale delle vendite consentite senza IVA ai sensi della presente "
"Dichiarazione di Intento"
#. module: l10n_it_edi_doi
#: model:ir.model.fields,help:l10n_it_edi_doi.field_l10n_it_edi_doi_declaration_of_intent__not_yet_invoiced
msgid ""
"Total amount of planned sales under this Declaration of Intent (i.e. current"
" quotation and sales orders) that can still be invoiced"
"Total amount of planned sales under this Declaration of Intent (i.e. current "
"quotation and sales orders) that can still be invoiced"
msgstr ""
"Importo totale delle vendite pianificate nell'ambito della presente Dichiarazione di "
"Intento (cioè l'offerta e gli ordini di vendita attuali) che possono ancora essere fatturati"
"Importo totale delle vendite pianificate nell'ambito della presente "
"Dichiarazione di Intento (cioè l'offerta e gli ordini di vendita attuali) "
"che possono ancora essere fatturati"
#. module: l10n_it_edi_doi
#: model:ir.model.fields,help:l10n_it_edi_doi.field_account_bank_statement_line__l10n_it_edi_doi_amount
#: model:ir.model.fields,help:l10n_it_edi_doi.field_account_move__l10n_it_edi_doi_amount
#: model:ir.model.fields,help:l10n_it_edi_doi.field_account_payment__l10n_it_edi_doi_amount
msgid "Total amount of sales under the Declaration of Intent of this document"
msgstr ""
"Importo totale delle vendite ai sensi della Dichiarazione di Intento del presente documento"
"Importo totale delle vendite ai sensi della Dichiarazione di Intento del "
"presente documento"
#. module: l10n_it_edi_doi
#: model:ir.model.fields,help:l10n_it_edi_doi.field_l10n_it_edi_doi_declaration_of_intent__invoiced
msgid ""
"Total amount of sales under this Declaration of Intent"
msgid "Total amount of sales under this Declaration of Intent"
msgstr ""
"Importo totale delle vendite ai sensi della presente Dichiarazione di Intento"
@ -731,8 +764,8 @@ msgid ""
"Total under the Declaration of Intent of this document that can still be "
"invoiced"
msgstr ""
"Totale ai sensi della Dichiarazione di Intento del presente documento che può ancora essere "
"fatturati"
"Totale ai sensi della Dichiarazione di Intento del presente documento che "
"può ancora essere fatturati"
#. module: l10n_it_edi_doi
#: model:ir.model.fields,help:l10n_it_edi_doi.field_l10n_it_edi_doi_declaration_of_intent__activity_exception_decoration
@ -742,7 +775,6 @@ msgstr "Tipo di attività eccezione sul record."
#. module: l10n_it_edi_doi
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_bank_statement_line__l10n_it_edi_doi_use
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_move__l10n_it_edi_doi_use
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_payment__l10n_it_edi_doi_use
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_sale_order__l10n_it_edi_doi_use
msgid "Use Declaration of Intent"
msgstr "Utilizzare Dichiarazione di Intento"
@ -765,7 +797,6 @@ msgstr "Cronologia comunicazioni sito web"
#. module: l10n_it_edi_doi
#. odoo-python
#: code:addons/l10n_it_edi_doi/models/declaration_of_intent.py:0
#, python-format
msgid ""
"You cannot delete Declarations of Intents that are already used on at least "
"one Invoice or Sales Order."
@ -776,18 +807,18 @@ msgstr ""
#. module: l10n_it_edi_doi
#. odoo-python
#: code:addons/l10n_it_edi_doi/models/account_fiscal_position.py:0
#, python-format
msgid ""
"You cannot delete the special fiscal position for Declarations of Intent."
msgstr ""
"Non è possibile eliminare la posizione fiscale speciale per le dichiarazioni di intento."
"Non è possibile eliminare la posizione fiscale speciale per le dichiarazioni "
"di intento."
#. module: l10n_it_edi_doi
#. odoo-python
#: code:addons/l10n_it_edi_doi/models/account_tax.py:0
#, python-format
msgid "You cannot delete the special tax for Declarations of Intent."
msgstr "Non è possibile eliminare la tassa speciale per le dichiarazioni di intento."
msgstr ""
"Non è possibile eliminare la tassa speciale per le dichiarazioni di intento."
#. module: l10n_it_edi_doi
#: model_terms:ir.ui.view,arch_db:l10n_it_edi_doi.report_invoice_document

View file

@ -4,10 +4,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0+e\n"
"Project-Id-Version: Odoo Server 19.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-06-11 09:25+0000\n"
"PO-Revision-Date: 2024-06-11 09:25+0000\n"
"POT-Creation-Date: 2026-03-06 19:06+0000\n"
"PO-Revision-Date: 2026-03-06 19:06+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -53,9 +53,7 @@ msgstr ""
#. module: l10n_it_edi_doi
#. odoo-python
#: code:addons/l10n_it_edi_doi/models/account_move.py:0
#: code:addons/l10n_it_edi_doi/models/sale_order.py:0
#, python-format
msgid "A line using tax %s should not contain any other taxes"
msgstr ""
@ -131,6 +129,11 @@ msgstr ""
msgid "Contact"
msgstr ""
#. module: l10n_it_edi_doi
#: model:ir.model,website_form_label:l10n_it_edi_doi.model_res_partner
msgid "Create a Customer"
msgstr ""
#. module: l10n_it_edi_doi
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_l10n_it_edi_doi_declaration_of_intent__create_uid
msgid "Created by"
@ -164,7 +167,6 @@ msgstr ""
#. module: l10n_it_edi_doi
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_bank_statement_line__l10n_it_edi_doi_date
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_move__l10n_it_edi_doi_date
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_payment__l10n_it_edi_doi_date
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_sale_order__l10n_it_edi_doi_date
msgid "Date on which Declaration of Intent is applied"
msgstr ""
@ -178,7 +180,6 @@ msgstr ""
#: model:ir.model,name:l10n_it_edi_doi.model_l10n_it_edi_doi_declaration_of_intent
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_bank_statement_line__l10n_it_edi_doi_id
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_move__l10n_it_edi_doi_id
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_payment__l10n_it_edi_doi_id
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_sale_order__l10n_it_edi_doi_id
#: model_terms:ir.ui.view,arch_db:l10n_it_edi_doi.view_account_invoice_filter
#: model_terms:ir.ui.view,arch_db:l10n_it_edi_doi.view_sales_order_filter
@ -188,7 +189,6 @@ msgstr ""
#. module: l10n_it_edi_doi
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_bank_statement_line__l10n_it_edi_doi_amount
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_move__l10n_it_edi_doi_amount
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_payment__l10n_it_edi_doi_amount
msgid "Declaration of Intent Amount"
msgstr ""
@ -210,7 +210,6 @@ msgstr ""
#. module: l10n_it_edi_doi
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_bank_statement_line__l10n_it_edi_doi_warning
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_move__l10n_it_edi_doi_warning
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_payment__l10n_it_edi_doi_warning
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_sale_order__l10n_it_edi_doi_warning
msgid "Declaration of Intent Threshold Warning"
msgstr ""
@ -219,19 +218,24 @@ msgstr ""
#. odoo-python
#: code:addons/l10n_it_edi_doi/models/account_move.py:0
#: code:addons/l10n_it_edi_doi/models/sale_order.py:0
#, python-format
msgid "Declaration of Intent for %s"
msgstr ""
#. module: l10n_it_edi_doi
#. odoo-python
#: code:addons/l10n_it_edi_doi/models/res_partner.py:0
#, python-format
msgid "Declaration of Intent of %s"
msgstr ""
#. module: l10n_it_edi_doi
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_chart_template__display_name
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_fiscal_position__display_name
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_move__display_name
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_tax__display_name
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_l10n_it_edi_doi_declaration_of_intent__display_name
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_res_company__display_name
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_res_partner__display_name
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_sale_order__display_name
msgid "Display Name"
msgstr ""
@ -241,6 +245,11 @@ msgstr ""
msgid "Draft"
msgstr ""
#. module: l10n_it_edi_doi
#: model:ir.model,name:l10n_it_edi_doi.model_account_tax
msgid "ETA tax codes mixin"
msgstr ""
#. module: l10n_it_edi_doi
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_l10n_it_edi_doi_declaration_of_intent__end_date
msgid "End Date"
@ -282,7 +291,6 @@ msgstr ""
#. odoo-python
#: code:addons/l10n_it_edi_doi/models/account_move.py:0
#: code:addons/l10n_it_edi_doi/models/sale_order.py:0
#, python-format
msgid ""
"Given the tax %s is applied, there should be a Declaration of Intent "
"selected."
@ -294,7 +302,14 @@ msgid "Has Message"
msgstr ""
#. module: l10n_it_edi_doi
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_chart_template__id
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_fiscal_position__id
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_move__id
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_tax__id
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_l10n_it_edi_doi_declaration_of_intent__id
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_res_company__id
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_res_partner__id
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_sale_order__id
msgid "ID"
msgstr ""
@ -329,11 +344,6 @@ msgstr ""
msgid "Invoiced"
msgstr ""
#. module: l10n_it_edi_doi
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_sale_order_line__qty_invoiced_posted
msgid "Invoiced Quantity (posted)"
msgstr ""
#. module: l10n_it_edi_doi
#: model_terms:ir.ui.view,arch_db:l10n_it_edi_doi.view_move_tree
msgid "Invoices"
@ -347,7 +357,6 @@ msgstr ""
#. module: l10n_it_edi_doi
#. odoo-python
#: code:addons/l10n_it_edi_doi/models/declaration_of_intent.py:0
#, python-format
msgid "Invoices using Declaration of Intent %s"
msgstr ""
@ -396,6 +405,11 @@ msgstr ""
msgid "My Activity Deadline"
msgstr ""
#. module: l10n_it_edi_doi
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_l10n_it_edi_doi_declaration_of_intent__activity_calendar_event_id
msgid "Next Activity Calendar Event"
msgstr ""
#. module: l10n_it_edi_doi
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_l10n_it_edi_doi_declaration_of_intent__activity_date_deadline
msgid "Next Activity Deadline"
@ -454,10 +468,9 @@ msgstr ""
#. module: l10n_it_edi_doi
#. odoo-python
#: code:addons/l10n_it_edi_doi/models/declaration_of_intent.py:0
#, python-format
msgid ""
"Pay attention, the threshold of your Declaration of Intent %s of %s is exceeded by %s, this document included.\n"
"Invoiced: %s; Not Yet Invoiced: %s"
"Pay attention, the threshold of your Declaration of Intent %(name)s of %(threshold)s is exceeded by %(exceeded)s, this document included.\n"
"Invoiced: %(invoiced)s; Not Yet Invoiced: %(not_yet_invoiced)s"
msgstr ""
#. module: l10n_it_edi_doi
@ -475,6 +488,11 @@ msgstr ""
msgid "Protocol Number"
msgstr ""
#. module: l10n_it_edi_doi
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_l10n_it_edi_doi_declaration_of_intent__rating_ids
msgid "Ratings"
msgstr ""
#. module: l10n_it_edi_doi
#: model_terms:ir.ui.view,arch_db:l10n_it_edi_doi.view_l10n_it_edi_doi_form
msgid "Reactivate"
@ -522,11 +540,6 @@ msgstr ""
msgid "Sales Order"
msgstr ""
#. module: l10n_it_edi_doi
#: model:ir.model,name:l10n_it_edi_doi.model_sale_order_line
msgid "Sales Order Line"
msgstr ""
#. module: l10n_it_edi_doi
#: model_terms:ir.ui.view,arch_db:l10n_it_edi_doi.view_quotation_tree
msgid "Sales Orders"
@ -540,7 +553,6 @@ msgstr ""
#. module: l10n_it_edi_doi
#. odoo-python
#: code:addons/l10n_it_edi_doi/models/declaration_of_intent.py:0
#, python-format
msgid "Sales Orders using Declaration of Intent %s"
msgstr ""
@ -578,11 +590,6 @@ msgid ""
"Planned: Future activities."
msgstr ""
#. module: l10n_it_edi_doi
#: model:ir.model,name:l10n_it_edi_doi.model_account_tax
msgid "Tax"
msgstr ""
#. module: l10n_it_edi_doi
#: model_terms:ir.ui.view,arch_db:l10n_it_edi_doi.view_move_tree
msgid "Tax excluded"
@ -606,43 +613,45 @@ msgstr ""
#. module: l10n_it_edi_doi
#. odoo-python
#: code:addons/l10n_it_edi_doi/models/declaration_of_intent.py:0
#, python-format
msgid "The Declaration of Intent belongs to company %s, not %s."
msgid ""
"The Declaration of Intent belongs to company %(declaration_company)s, not "
"%(company)s."
msgstr ""
#. module: l10n_it_edi_doi
#. odoo-python
#: code:addons/l10n_it_edi_doi/models/declaration_of_intent.py:0
#, python-format
msgid "The Declaration of Intent belongs to partner %s, not %s."
msgid ""
"The Declaration of Intent belongs to partner %(declaration_partner)s, not "
"%(partner)s."
msgstr ""
#. module: l10n_it_edi_doi
#. odoo-python
#: code:addons/l10n_it_edi_doi/models/declaration_of_intent.py:0
#, python-format
msgid "The Declaration of Intent is in draft."
msgstr ""
#. module: l10n_it_edi_doi
#. odoo-python
#: code:addons/l10n_it_edi_doi/models/declaration_of_intent.py:0
#, python-format
msgid "The Declaration of Intent is valid from %s to %s, not on %s."
msgid ""
"The Declaration of Intent is valid from %(start_date)s to %(end_date)s, not "
"on %(date)s."
msgstr ""
#. module: l10n_it_edi_doi
#. odoo-python
#: code:addons/l10n_it_edi_doi/models/declaration_of_intent.py:0
#, python-format
msgid "The Declaration of Intent must be active."
msgstr ""
#. module: l10n_it_edi_doi
#. odoo-python
#: code:addons/l10n_it_edi_doi/models/declaration_of_intent.py:0
#, python-format
msgid "The Declaration of Intent uses currency %s, not %s."
msgid ""
"The Declaration of Intent uses currency %(declaration_currency)s, not "
"%(currency)s."
msgstr ""
#. module: l10n_it_edi_doi
@ -694,7 +703,6 @@ msgstr ""
#. module: l10n_it_edi_doi
#: model:ir.model.fields,help:l10n_it_edi_doi.field_account_bank_statement_line__l10n_it_edi_doi_amount
#: model:ir.model.fields,help:l10n_it_edi_doi.field_account_move__l10n_it_edi_doi_amount
#: model:ir.model.fields,help:l10n_it_edi_doi.field_account_payment__l10n_it_edi_doi_amount
msgid "Total amount of sales under the Declaration of Intent of this document"
msgstr ""
@ -718,7 +726,6 @@ msgstr ""
#. module: l10n_it_edi_doi
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_bank_statement_line__l10n_it_edi_doi_use
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_move__l10n_it_edi_doi_use
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_account_payment__l10n_it_edi_doi_use
#: model:ir.model.fields,field_description:l10n_it_edi_doi.field_sale_order__l10n_it_edi_doi_use
msgid "Use Declaration of Intent"
msgstr ""
@ -741,7 +748,6 @@ msgstr ""
#. module: l10n_it_edi_doi
#. odoo-python
#: code:addons/l10n_it_edi_doi/models/declaration_of_intent.py:0
#, python-format
msgid ""
"You cannot delete Declarations of Intents that are already used on at least "
"one Invoice or Sales Order."
@ -750,7 +756,6 @@ msgstr ""
#. module: l10n_it_edi_doi
#. odoo-python
#: code:addons/l10n_it_edi_doi/models/account_fiscal_position.py:0
#, python-format
msgid ""
"You cannot delete the special fiscal position for Declarations of Intent."
msgstr ""
@ -758,7 +763,6 @@ msgstr ""
#. module: l10n_it_edi_doi
#. odoo-python
#: code:addons/l10n_it_edi_doi/models/account_tax.py:0
#, python-format
msgid "You cannot delete the special tax for Declarations of Intent."
msgstr ""

View file

@ -7,4 +7,3 @@ from . import declaration_of_intent
from . import res_company
from . import res_partner
from . import sale_order
from . import sale_order_line

View file

@ -1,23 +1,26 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
from odoo.addons.account.models.chart_template import template
class AccountChartTemplate(models.AbstractModel):
_inherit = 'account.chart.template'
def _load(self, company):
res = super()._load(company)
if self == self.env.ref('l10n_it.l10n_it_chart_template_generic'):
doi_tax = self.env.ref(f'l10n_it_edi_doi.{company.id}_00di', raise_if_not_found=False)
if doi_tax:
doi_tax.write({
'l10n_it_has_exoneration': True,
'l10n_it_kind_exoneration': 'N3.5',
'l10n_it_law_reference': 'art. 8, c. 1, lett. c) D.P.R. 633/1972',
})
company.l10n_it_edi_doi_tax_id = doi_tax
@template('it', 'account.tax')
def _get_it_edi_doi_account_tax(self):
tax_data = self._parse_csv('it', 'account.tax', module='l10n_it_edi_doi')
self._deref_account_tags('it', tax_data)
return tax_data
doi_fiscal_position = self.env.ref(f'l10n_it_edi_doi.{company.id}_declaration_of_intent_fiscal_position', raise_if_not_found=False)
if doi_fiscal_position:
company.l10n_it_edi_doi_fiscal_position_id = doi_fiscal_position
return res
@template('it', 'account.fiscal.position')
def _get_it_edi_doi_account_fiscal_position(self):
return self._parse_csv('it', 'account.fiscal.position', module='l10n_it_edi_doi')
@template('it', 'res.company')
def _get_it_edi_doi_res_company(self):
return {
self.env.company.id: {
'l10n_it_edi_doi_tax_id': '00di',
'l10n_it_edi_doi_fiscal_position_id': 'declaration_of_intent_fiscal_position',
},
}

View file

@ -121,7 +121,7 @@ class AccountMove(models.Model):
order = sale_line.order_id
if order.l10n_it_edi_doi_id == declaration:
linked_orders |= order
qty_invoiced = invoice_line.product_uom_id._compute_quantity(invoice_line.quantity, sale_line.product_uom) * -move.direction_sign
qty_invoiced = invoice_line.product_uom_id._compute_quantity(invoice_line.quantity, sale_line.product_uom_id) * -move.direction_sign
sale_line_id = sale_line.ids[0] # do not just use `id` in case of NewId
additional_invoiced_qty[sale_line_id] = additional_invoiced_qty.get(sale_line_id, 0) + qty_invoiced
for order in linked_orders:
@ -193,9 +193,6 @@ class AccountMove(models.Model):
if declaration_lines and not declaration:
errors.append(_('Given the tax %s is applied, there should be a Declaration of Intent selected.',
declaration_of_intent_tax.name))
if any(line.tax_ids != declaration_of_intent_tax for line in declaration_lines):
errors.append(_('A line using tax %s should not contain any other taxes',
declaration_of_intent_tax.name))
if errors:
raise UserError('\n'.join(errors))

View file

@ -5,9 +5,9 @@ from odoo.exceptions import UserError
from odoo.tools.misc import formatLang
class L10nItDeclarationOfIntent(models.Model):
_name = "l10n_it_edi_doi.declaration_of_intent"
_inherit = ['mail.thread', 'mail.activity.mixin']
class L10n_It_Edi_DoiDeclaration_Of_Intent(models.Model):
_name = 'l10n_it_edi_doi.declaration_of_intent'
_inherit = ['mail.thread.main.attachment', 'mail.activity.mixin']
_description = "Declaration of Intent"
_order = 'protocol_number_part1, protocol_number_part2'
@ -33,7 +33,7 @@ class L10nItDeclarationOfIntent(models.Model):
string='Company',
index=True,
required=True,
default=lambda self: self.env.company,
default=lambda self: self.env.company._accessible_branches()[:1],
)
partner_id = fields.Many2one(
@ -134,17 +134,19 @@ class L10nItDeclarationOfIntent(models.Model):
readonly=True,
)
_sql_constraints = [
('protocol_number_unique',
'unique(protocol_number_part1, protocol_number_part2)',
"The Protocol Number of a Declaration of Intent must be unique! Please choose another one."),
('threshold_positive',
'CHECK(threshold > 0)',
"The Threshold of a Declaration of Intent must be positive."),
]
_protocol_number_unique = models.Constraint(
'unique(protocol_number_part1, protocol_number_part2)',
'The Protocol Number of a Declaration of Intent must be unique! Please choose another one.',
)
_threshold_positive = models.Constraint(
'CHECK(threshold > 0)',
'The Threshold of a Declaration of Intent must be positive.',
)
def name_get(self):
return [(record.id, f"{record.protocol_number_part1}-{record.protocol_number_part2}") for record in self]
@api.depends('protocol_number_part1', 'protocol_number_part2')
def _compute_display_name(self):
for record in self:
record.display_name = f"{record.protocol_number_part1}-{record.protocol_number_part2}"
@api.depends('invoice_ids', 'invoice_ids.state', 'invoice_ids.l10n_it_edi_doi_amount')
def _compute_invoiced(self):
@ -181,13 +183,13 @@ class L10nItDeclarationOfIntent(models.Model):
if self.currency_id.compare_amounts(updated_remaining, 0) >= 0:
return ''
return _(
'Pay attention, the threshold of your Declaration of Intent %s of %s is exceeded by %s, this document included.\n'
'Invoiced: %s; Not Yet Invoiced: %s',
self.display_name,
formatLang(self.env, self.threshold, currency_obj=self.currency_id),
formatLang(self.env, - updated_remaining, currency_obj=self.currency_id),
formatLang(self.env, invoiced, currency_obj=self.currency_id),
formatLang(self.env, not_yet_invoiced, currency_obj=self.currency_id),
'Pay attention, the threshold of your Declaration of Intent %(name)s of %(threshold)s is exceeded by %(exceeded)s, this document included.\n'
'Invoiced: %(invoiced)s; Not Yet Invoiced: %(not_yet_invoiced)s',
name=self.display_name,
threshold=formatLang(self.env, self.threshold, currency_obj=self.currency_id),
exceeded=formatLang(self.env, - updated_remaining, currency_obj=self.currency_id),
invoiced=formatLang(self.env, invoiced, currency_obj=self.currency_id),
not_yet_invoiced=formatLang(self.env, not_yet_invoiced, currency_obj=self.currency_id),
)
def _get_validity_errors(self, company, partner, currency):
@ -199,14 +201,14 @@ class L10nItDeclarationOfIntent(models.Model):
errors = []
for declaration in self:
if not company or declaration.company_id != company:
errors.append(_("The Declaration of Intent belongs to company %s, not %s.",
declaration.company_id.name, company.name))
errors.append(_("The Declaration of Intent belongs to company %(declaration_company)s, not %(company)s.",
declaration_company=declaration.company_id.name, company=company.name))
if not currency or declaration.currency_id != currency:
errors.append(_("The Declaration of Intent uses currency %s, not %s.",
declaration.currency_id.name, currency.name))
errors.append(_("The Declaration of Intent uses currency %(declaration_currency)s, not %(currency)s.",
declaration_currency=declaration.currency_id.name, currency=currency.name))
if not partner or declaration.partner_id != partner.commercial_partner_id:
errors.append(_("The Declaration of Intent belongs to partner %s, not %s.",
declaration.partner_id.name, partner.commercial_partner_id.name))
errors.append(_("The Declaration of Intent belongs to partner %(declaration_partner)s, not %(partner)s.",
declaration_partner=declaration.partner_id.name, partner=partner.commercial_partner_id.name))
return errors
def _get_validity_warnings(self, company, partner, currency, date, invoiced_amount=0, only_blocking=False, sales_order=False):
@ -228,8 +230,8 @@ class L10nItDeclarationOfIntent(models.Model):
if declaration.state != 'active':
errors.append(_("The Declaration of Intent must be active."))
if not sales_order and (not date or declaration.start_date > date or declaration.end_date < date):
errors.append(_("The Declaration of Intent is valid from %s to %s, not on %s.",
declaration.start_date, declaration.end_date, date))
errors.append(_("The Declaration of Intent is valid from %(start_date)s to %(end_date)s, not on %(date)s.",
start_date=declaration.start_date, end_date=declaration.end_date, date=date))
return errors
@api.model
@ -289,7 +291,7 @@ class L10nItDeclarationOfIntent(models.Model):
'type': 'ir.actions.act_window',
'res_model': 'sale.order',
'domain': [('id', 'in', self.sale_order_ids.ids)],
'views': [(self.env.ref('l10n_it_edi_doi.view_quotation_tree').id, 'tree'), (False, 'form')],
'views': [(self.env.ref('l10n_it_edi_doi.view_quotation_tree').id, 'list'), (False, 'form')],
'search_view_id': [self.env.ref('sale.sale_order_view_search_inherit_quotation').id],
'context': {
'search_default_sales': 1,
@ -303,7 +305,7 @@ class L10nItDeclarationOfIntent(models.Model):
'type': 'ir.actions.act_window',
'res_model': 'account.move',
'domain': [('id', 'in', self.invoice_ids.ids)],
'views': [(self.env.ref('l10n_it_edi_doi.view_move_tree').id, 'tree'), (False, 'form')],
'views': [(self.env.ref('l10n_it_edi_doi.view_move_tree').id, 'list'), (False, 'form')],
'search_view_id': [self.env.ref('account.view_account_invoice_filter').id],
'context': {
'search_default_posted': 1,

View file

@ -20,7 +20,7 @@ class ResPartner(models.Model):
'type': 'ir.actions.act_window',
'res_model': 'l10n_it_edi_doi.declaration_of_intent',
'domain': [('partner_id', '=', self.commercial_partner_id.id)],
'views': [(self.env.ref('l10n_it_edi_doi.view_l10n_it_edi_doi_tree').id, 'tree'),
'views': [(self.env.ref('l10n_it_edi_doi.view_l10n_it_edi_doi_tree').id, 'list'),
(self.env.ref('l10n_it_edi_doi.view_l10n_it_edi_doi_form').id, 'form')],
'context': {
'default_partner_id': self.id,

View file

@ -163,12 +163,12 @@ class SaleOrder(models.Model):
if not declaration_of_intent_tax:
continue
declaration_tax_lines = order.order_line.filtered(
lambda line: declaration_of_intent_tax in line.tax_id
lambda line: declaration_of_intent_tax in line.tax_ids
)
if declaration_tax_lines and not order.l10n_it_edi_doi_id:
errors.append(_('Given the tax %s is applied, there should be a Declaration of Intent selected.',
declaration_of_intent_tax.name))
if any(line.tax_id != declaration_of_intent_tax for line in declaration_tax_lines):
if any(line.tax_ids != declaration_of_intent_tax for line in declaration_tax_lines):
errors.append(_('A line using tax %s should not contain any other taxes',
declaration_of_intent_tax.name))
if errors:
@ -240,7 +240,7 @@ class SaleOrder(models.Model):
order_lines = order.order_line.filtered(
# The declaration tax cannot be used with other taxes on a single line
# (checked in `action_confirm`)
lambda line: line.tax_id.ids == tax.ids
lambda line: line.tax_ids.ids == tax.ids
)
order_not_yet_invoiced = 0
for line in order_lines:

View file

@ -1,31 +0,0 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
class SaleOrderLine(models.Model):
_inherit = "sale.order.line"
qty_invoiced_posted = fields.Float(
string="Invoiced Quantity (posted)",
compute='_compute_qty_invoiced_posted',
digits='Product Unit of Measure',
store=True,
)
@api.depends('invoice_lines.move_id.state', 'invoice_lines.quantity')
def _compute_qty_invoiced_posted(self):
"""
This method is almost identical to '_compute_qty_invoiced()'. The only difference lies in the fact that
for accounting purposes, we only want the quantities of the posted invoices.
We need a dedicated computation because the triggers are different and could lead to incorrect values for
'qty_invoiced' when computed together.
"""
for line in self:
qty_invoiced_posted = 0.0
for invoice_line in line._get_invoice_lines():
if invoice_line.move_id.state == 'posted' or invoice_line.move_id.payment_state == 'invoicing_legacy':
qty_unsigned = invoice_line.product_uom_id._compute_quantity(invoice_line.quantity, line.product_uom)
qty_signed = qty_unsigned * -invoice_line.move_id.direction_sign
qty_invoiced_posted += qty_signed
line.qty_invoiced_posted = qty_invoiced_posted

View file

@ -8,8 +8,9 @@ from odoo.addons.l10n_it_edi.tests.common import TestItEdi
class TestItEdiDoi(TestItEdi):
@classmethod
def setUpClass(cls, chart_template_ref='l10n_it.l10n_it_chart_template_generic'):
super().setUpClass(chart_template_ref=chart_template_ref)
@TestItEdi.setup_country('it')
def setUpClass(cls):
super().setUpClass()
cls.declaration_1000 = cls.env['l10n_it_edi_doi.declaration_of_intent'].create({
'company_id': cls.company.id,

View file

@ -9,6 +9,10 @@ from odoo.tests import tagged, Form
@tagged('post_install_l10n', 'post_install', '-at_install')
class TestItEdiDoiRemaining(TestItEdiDoi):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.env.user.group_ids |= cls.env.ref('sales_team.group_sale_salesman')
def create_invoice(self, declaration, invoice_line_vals):
return self.env['account.move'].create({
@ -93,7 +97,7 @@ class TestItEdiDoiRemaining(TestItEdiDoi):
'product_id': self.product_1.id,
'price_unit': 1000.0, # == declaration.threshold
'product_uom_qty': 2,
'tax_id': [Command.set(declaration_tax.ids)],
'tax_ids': [Command.set(declaration_tax.ids)],
}),
])
@ -124,7 +128,6 @@ class TestItEdiDoiRemaining(TestItEdiDoi):
"Pay attention, the threshold of your Declaration of Intent test 2019-threshold 1000 of 1,000.00\xa0€ is exceeded by 1,000.00\xa0€, this document included.\n"
"Invoiced: 0.00\xa0€; Not Yet Invoiced: 2,000.00\xa0"
)
with Form(order) as order_form:
with order_form.order_line.edit(0) as line_form:
line_form.price_unit = 3000
line_form.save()
@ -169,7 +172,7 @@ class TestItEdiDoiRemaining(TestItEdiDoi):
'name': 'not a declaration line',
'quantity': 1,
'price_unit': 2000.0, # > declaration.threshold; not counted
'tax_ids': [Command.set(self.company.account_sale_tax_id.ids)],
'tax_ids': False,
}),
])
# The amounts have not changed since the invoice has not been posted yet.
@ -218,13 +221,13 @@ class TestItEdiDoiRemaining(TestItEdiDoi):
'name': 'declaration line',
'product_id': self.product_1.id,
'price_unit': 1000.0, # == declaration.threshold
'tax_id': [Command.set(declaration_tax.ids)],
'tax_ids': [Command.set(declaration_tax.ids)],
}),
Command.create({
'name': 'not a declaration line',
'product_id': self.product_1.id,
'price_unit': 2000.0, # > declaration.threshold; not counted
'tax_id': False,
'tax_ids': False,
}),
])
@ -267,7 +270,7 @@ class TestItEdiDoiRemaining(TestItEdiDoi):
'name': 'none declaration line',
'quantity': 1,
'price_unit': 2000.0, # > declaration.threshold; not counted
'tax_ids': [Command.set(self.company.account_sale_tax_id.ids)],
'tax_ids': False,
}),
])
# The amounts have not changed since the invoice has not been posted yet.
@ -314,13 +317,13 @@ class TestItEdiDoiRemaining(TestItEdiDoi):
'name': 'declaration line',
'product_id': self.product_1.id,
'price_unit': 2000.0, # > declaration.threshold
'tax_id': [Command.set(declaration_tax.ids)],
'tax_ids': [Command.set(declaration_tax.ids)],
}),
Command.create({
'name': 'not a declaration line',
'product_id': self.product_1.id,
'price_unit': 2000.0, # > declaration.threshold; not counted
'tax_id': [Command.set(self.company.account_sale_tax_id.ids)],
'tax_ids': False,
}),
])
independent_order.action_confirm()
@ -335,13 +338,13 @@ class TestItEdiDoiRemaining(TestItEdiDoi):
'name': 'declaration line',
'product_id': self.product_1.id,
'price_unit': 1000.0, # == declaration.threshold
'tax_id': [Command.set(declaration_tax.ids)],
'tax_ids': [Command.set(declaration_tax.ids)],
}),
Command.create({
'name': 'not a declaration line',
'product_id': self.product_1.id,
'price_unit': 2000.0, # > declaration.threshold; not counted
'tax_id': [Command.set(self.company.account_sale_tax_id.ids)],
'tax_ids': False,
}),
])
order.action_confirm()
@ -351,13 +354,7 @@ class TestItEdiDoiRemaining(TestItEdiDoi):
'remaining': -2000.0,
}])
downpayment_product = self.env['product.product'].create({
'name': 'Down Payment',
'taxes_id': [Command.set(self.company.account_sale_tax_id.copy({'price_include': True}).ids)],
'type': 'service',
})
self.env['ir.config_parameter'].sudo().set_param('sale.default_deposit_product_id', downpayment_product.id)
for i in range(2):
for _i in range(2):
self.env['sale.advance.payment.inv'].with_context({
'active_model': 'sale.order',
'active_ids': [order.id],
@ -366,7 +363,6 @@ class TestItEdiDoiRemaining(TestItEdiDoi):
}).create({
'advance_payment_method': 'percentage',
'amount': 50,
'deposit_account_id': self.company_data_2['default_account_revenue'].id,
}).create_invoices()
invoice = order.invoice_ids[0]
@ -379,7 +375,7 @@ class TestItEdiDoiRemaining(TestItEdiDoi):
"Invoiced: 500.00\xa0€; Not Yet Invoiced: 2,500.00\xa0"
)
invoice.invoice_line_ids.filtered(lambda l: l.tax_ids.ids == declaration_tax.ids).price_unit = 2000 # 1000 more than the sales order declaration amount
invoice.invoice_line_ids[0].price_unit = 2000 # 1000 more than the sales order declaration amount
# Changing an invoice line does not affect the not yet invoiced amount of sale order lines not linked to that line
self.assertEqual(
invoice.l10n_it_edi_doi_warning,
@ -416,7 +412,7 @@ class TestItEdiDoiRemaining(TestItEdiDoi):
).reverse_moves()
# The invoice we reversed invoiced more than the sales order amount.
credit_note = invoice.reversal_move_id
credit_note = invoice.reversal_move_ids
self.assertEqual(
credit_note.l10n_it_edi_doi_warning,
"Pay attention, the threshold of your Declaration of Intent test 2019-threshold 1000 of 1,000.00\xa0€ is exceeded by 2,000.00\xa0€, this document included.\n"
@ -456,7 +452,7 @@ class TestItEdiDoiRemaining(TestItEdiDoi):
'product_id': self.product_1.id,
'product_uom_qty': 2,
'price_unit': 2000.0, # > declaration.threshold
'tax_id': [Command.set(declaration_tax.ids)],
'tax_ids': [Command.set(declaration_tax.ids)],
}),
]) for dummy in range(3)
])

View file

@ -9,7 +9,7 @@
<xpath expr="//search/field[@name='journal_id']" position="after">
<field name="l10n_it_edi_doi_id"/>
</xpath>
<xpath expr="//filter[@name='to_check']" position="after">
<xpath expr="//filter[@name='out_refund']" position="after">
<filter string="Exceeded Declaration of Intent"
name="l10n_it_edi_doi_declaration_of_intent_exceeded"
domain="[('l10n_it_edi_doi_id.remaining','&lt;', 0)]"/>
@ -23,19 +23,19 @@
</record>
<record id="view_move_tree" model="ir.ui.view">
<field name="name">account.move.tree</field>
<field name="name">account.move.list</field>
<field name="model">account.move</field>
<field name="arch" type="xml">
<tree string="Invoices" sample="1" decoration-info="state == 'draft'">
<field name="made_sequence_hole" attrs="{'column_invisible': True}"/>
<field name="name" decoration-bf="1" decoration-danger="made_sequence_hole"/>
<list string="Invoices" sample="1" decoration-info="state == 'draft'" expand="context.get('expand', False)">
<field name="made_sequence_gap" column_invisible="True"/>
<field name="name" decoration-bf="1" decoration-danger="made_sequence_gap"/>
<field name="invoice_partner_display_name" string="Customer"/>
<field name="invoice_date" string="Invoice Date"/>
<field name="date" string="Accounting Date" optional="hidden"/>
<field name="currency_id" attrs="{'column_invisible': True}"/>
<field name="currency_id" column_invisible="True"/>
<field name="state" widget="badge" decoration-info="state == 'draft'" decoration-success="state == 'posted'"/>
<field name="l10n_it_edi_doi_amount" decoration-bf="1" sum="Total" string="Tax excluded"/>
</tree>
</list>
</field>
</record>
@ -50,7 +50,7 @@
class="oe_stat_button"
name="action_open_declaration_of_intent"
icon="fa-list"
attrs="{'invisible': [('l10n_it_edi_doi_id', '=', False)]}">
invisible="not l10n_it_edi_doi_id">
<div class="o_field_widget o_stat_info">
<span class="o_stat_text">Declaration of Intent</span>
</div>
@ -58,14 +58,15 @@
</div>
<xpath expr="//header" position="after">
<div class="alert alert-warning mb-0" role="alert"
attrs="{'invisible': [('l10n_it_edi_doi_warning', '=', '')]}">
invisible="not l10n_it_edi_doi_warning">
<field name="l10n_it_edi_doi_warning"/>
</div>
</xpath>
<xpath expr="//field[@name='fiscal_position_id']" position="before">
<field name="l10n_it_edi_doi_use" invisible="True"/>
<field name="l10n_it_edi_doi_id"
attrs="{'invisible': [('l10n_it_edi_doi_use', '=', False)], 'readonly': [('state', '!=', 'draft')]}"
invisible="not l10n_it_edi_doi_use"
readonly="state != 'draft'"
options='{"no_quick_create": True}'
domain="[
('state', '!=', 'draft'),

View file

@ -2,29 +2,29 @@
<odoo>
<record id="view_l10n_it_edi_doi_tree" model="ir.ui.view">
<field name="name">l10n_it_edi_doi.declaration_of_intent.tree</field>
<field name="name">l10n_it_edi_doi.declaration_of_intent.list</field>
<field name="model">l10n_it_edi_doi.declaration_of_intent</field>
<field name="arch" type="xml">
<tree decoration-info="state == 'draft'"
<list decoration-info="state == 'draft'"
decoration-muted="state == 'terminated'"
decoration-danger="state == 'revoked'">
<control>
<create name="add_line_control" string="Add a Declaration of Intent"/>
</control>
<field name="currency_id" attrs="{'column_invisible': True}"/>
<field name="partner_id" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
<field name="currency_id" column_invisible="True"/>
<field name="partner_id" readonly="state != 'draft'"/>
<field name="company_id" groups="base.group_multi_company" optional="hidden"/>
<field name="protocol_number_part1" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
<field name="protocol_number_part2" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
<field name="issue_date" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
<field name="start_date" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
<field name="end_date" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
<field name="threshold" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
<field name="protocol_number_part1" readonly="state != 'draft'"/>
<field name="protocol_number_part2" readonly="state != 'draft'"/>
<field name="issue_date" readonly="state != 'draft'"/>
<field name="start_date" readonly="state != 'draft'"/>
<field name="end_date" readonly="state != 'draft'"/>
<field name="threshold" readonly="state != 'draft'"/>
<field name="not_yet_invoiced" optional="hidden"/>
<field name="invoiced" optional="hidden"/>
<field name="remaining"/>
<field name="state"/>
</tree>
</list>
</field>
</record>
@ -35,15 +35,15 @@
<form>
<header>
<field name="state" widget="statusbar" statusbar_visible="draft,active"/>
<button string="Validate" attrs="{'invisible': [('state', '!=', 'draft')]}" class="btn-primary"
<button string="Validate" invisible="state != 'draft'" class="btn-primary"
type="object" name="action_validate"/>
<button string="Terminate" attrs="{'invisible': [('state', '!=', 'active')]}" class="btn-primary"
<button string="Terminate" invisible="state != 'active'" class="btn-primary"
type="object" name="action_terminate"/>
<button string="Reset to Draft" attrs="{'invisible': [('state', '!=', 'active')]}" class="btn-secondary"
<button string="Reset to Draft" invisible="state != 'active'" class="btn-secondary"
type="object" name="action_reset_to_draft"/>
<button string="Reactivate" attrs="{'invisible': [('state', 'not in', ('terminated', 'revoked'))]}" class="btn-secondary"
<button string="Reactivate" invisible="state not in ['terminated', 'revoked']" class="btn-secondary"
type="object" name="action_reactivate"/>
<button string="Revoke" attrs="{'invisible': [('state', '!=', 'active')]}" class="btn-secondary"
<button string="Revoke" invisible="state != 'active'" class="btn-secondary"
type="object" name="action_revoke"/>
</header>
<sheet>
@ -54,7 +54,7 @@
class="oe_stat_button"
name="action_open_invoice_ids"
icon="fa-pencil-square-o"
attrs="{'invisible': [('invoice_ids', '=', False)]}">
invisible="not invoice_ids">
<div class="o_field_widget o_stat_info">
<span class="o_stat_text">Invoices</span>
</div>
@ -63,7 +63,7 @@
class="oe_stat_button"
name="action_open_sale_order_ids"
icon="fa-pencil-square-o"
attrs="{'invisible': [('sale_order_ids', '=', False)]}">
invisible="not sale_order_ids">
<div class="o_field_widget o_stat_info">
<span class="o_stat_text">Sale Orders</span>
</div>
@ -71,20 +71,20 @@
</div>
<group name="main_group">
<group name="left_column">
<field name="partner_id" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
<field name="company_id" groups="base.group_multi_company" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
<field name="partner_id" readonly="state != 'draft'"/>
<field name="company_id" groups="base.group_multi_company" readonly="state != 'draft'"/>
<label for="protocol_number_part1" string="Protocol Number"/>
<div name="protocol_div" class="d-flex">
<field name="protocol_number_part1" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
<field name="protocol_number_part1" readonly="state != 'draft'"/>
<span class="o_form_label mx-3">/</span>
<field name="protocol_number_part2" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
<field name="protocol_number_part2" readonly="state != 'draft'"/>
</div>
<field name="issue_date" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
<field name="issue_date" readonly="state != 'draft'"/>
<label string="Date Range" for="start_date"/>
<div name="date_range_div" class="d-flex">
<field name="start_date" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
<field name="start_date" readonly="state != 'draft'"/>
<span class="o_form_label mx-3"> to </span>
<field name="end_date" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
<field name="end_date" readonly="state != 'draft'"/>
</div>
</group>
<group name="right_column">
@ -92,18 +92,14 @@
<span class="o_form_label">Amounts:</span>
</div>
<field name="currency_id" invisible="True"/>
<field name="threshold" widget="monetary" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
<field name="threshold" widget="monetary" readonly="state != 'draft'"/>
<field name="not_yet_invoiced" widget="monetary"/>
<field name="invoiced" widget="monetary"/>
<field name="remaining" widget="monetary"/>
</group>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" groups="base.group_user"/>
<field name="message_ids"/>
<field name="activity_ids"/>
</div>
<chatter/>
</form>
</field>
</record>

View file

@ -26,7 +26,7 @@
class="oe_stat_button"
name="l10n_it_edi_doi_action_open_declarations"
icon="fa-list"
attrs="{'invisible': [('country_code', '!=', 'IT')]}">
invisible="'IT' not in fiscal_country_codes">
<div class="o_field_widget o_stat_info">
<span class="o_stat_text">Declarations of Intent</span>
</div>

View file

@ -13,31 +13,31 @@
<xpath expr="//search/group" position="inside">
<filter string="Declaration of Intent"
name="l10n_it_edi_doi_declaration_of_intent"
domain="" context="{'group_by':'l10n_it_edi_doi_id'}"/>
context="{'group_by': 'l10n_it_edi_doi_id'}"/>
</xpath>
</field>
</record>
<record id="view_quotation_tree" model="ir.ui.view">
<field name="name">sale.order.tree</field>
<field name="name">sale.order.list</field>
<field name="model">sale.order</field>
<field name="priority">1000</field>
<field name="arch" type="xml">
<tree class="o_sale_order"
<list class="o_sale_order"
string="Sales Orders"
sample="1"
decoration-muted="state == 'cancel'">
<field name="name" string="Number"/>
<field name="date_order" widget="date"/>
<field name="partner_id"/>
<field name="currency_id" attrs="{'column_invisible': True}"/>
<field name="currency_id" column_invisible="True"/>
<field name="state"
decoration-success="state == 'sale'"
decoration-info="state == 'draft'"
decoration-primary="state == 'sent'"
widget="badge"/>
<field name="l10n_it_edi_doi_not_yet_invoiced" decoration-bf="1" sum="Total" string="Not Yet Invoiced Amount"/>
</tree>
</list>
</field>
</record>
@ -52,22 +52,22 @@
class="oe_stat_button"
name="action_open_declaration_of_intent"
icon="fa-list"
attrs="{'invisible': [('l10n_it_edi_doi_id', '=', False)]}">
invisible="not l10n_it_edi_doi_id">
<div class="o_field_widget o_stat_info">
<span class="o_stat_text">Declaration of Intent</span>
</div>
</button>
</div>
<xpath expr="//header" position="after">
<header position="after">
<div class="alert alert-warning mb-0" role="alert"
attrs="{'invisible': [('l10n_it_edi_doi_warning', '=', '')]}">
invisible="not l10n_it_edi_doi_warning">
<field name="l10n_it_edi_doi_warning"/>
</div>
</xpath>
</header>
<xpath expr="//label[@for='fiscal_position_id']" position="before">
<field name="l10n_it_edi_doi_use" invisible="True"/>
<field name="l10n_it_edi_doi_id"
attrs="{'invisible': [('l10n_it_edi_doi_use', '=', False)]}"
invisible="not l10n_it_edi_doi_use"
options='{"no_quick_create": True}'
domain="[
('state', '!=', 'draft'),

View file

@ -1,3 +0,0 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import sale_make_invoice_advance

View file

@ -1,93 +0,0 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
from odoo.fields import Command
class SaleAdvancePaymentInv(models.TransientModel):
_inherit = 'sale.advance.payment.inv'
def _create_invoices(self, sale_orders):
"""Extend to create a dedicated down payment line for the declaration of intent amount."""
invoice = super()._create_invoices(sale_orders)
if self.advance_payment_method == 'delivered':
return invoice
order = self.sale_order_ids # super calls ensure_one
doi_tax = order.l10n_it_edi_doi_id.company_id.l10n_it_edi_doi_tax_id
if not doi_tax:
# Includes the case where there is no order.l10n_it_edi_doi_id
return invoice
doi_total = 0
for line in order.order_line:
if line.tax_id.ids != doi_tax.ids:
continue
price_reduce = line.price_unit * (1 - (line.discount or 0.0) / 100.0)
doi_total += price_reduce * line.product_uom_qty
# The tax on the down payment product was possibly mapped by the doi fiscal position
# Here we do a custom mapping that does not map taxes that will be mapped to the special doi tax
doi_fiscal_position = order.l10n_it_edi_doi_id.company_id.l10n_it_edi_doi_fiscal_position_id
advance_product_taxes = self.product_id.taxes_id.filtered(lambda tax: tax.company_id == order.company_id)
if advance_product_taxes and doi_fiscal_position and order.fiscal_position_id == doi_fiscal_position:
custom_mapped_taxes = self.env['account.tax']
for tax in advance_product_taxes:
mapped_tax = doi_fiscal_position.map_tax(tax)
custom_mapped_taxes |= tax if mapped_tax == doi_tax else mapped_tax
advance_product_taxes = custom_mapped_taxes
for invoice_line in invoice.invoice_line_ids:
if not invoice_line.is_downpayment:
continue
downpayment_line = invoice_line.sale_line_ids.filtered(lambda line: line.is_downpayment)
if len(downpayment_line) != 1:
continue
if advance_product_taxes:
downpayment_line.tax_id = advance_product_taxes
invoice_line.tax_ids = advance_product_taxes
if order.currency_id.is_zero(doi_total):
# The order has no lines contributing to the declaration of intent
continue
# Split the down payment amount into 2: doi amount and other amount
down_total = downpayment_line.price_unit
if all(advance_product_taxes.mapped('price_include')):
amount_total = order.amount_total
else:
amount_total = order.amount_untaxed
doi_down = order.currency_id.round(doi_total / amount_total * down_total)
other_down = down_total - doi_down
if order.currency_id.is_zero(amount_total - doi_total):
# The whole order amount is under doi_tax
# We just have to add the tax information on the lines
downpayment_line.tax_id = doi_tax
invoice_line.tax_ids = doi_tax
continue
# The order amount is partially not under doi_tax
# Split the down payment line into 2: one for the doi amount and one for the other amount
downpayment_line.price_unit = other_down
doi_so_line_values = {
**self._prepare_so_line_values(order),
'price_unit': doi_down,
'tax_id': [Command.set(doi_tax.ids)],
}
doi_down_payment_so_line = self.env['sale.order.line'].create(doi_so_line_values)
# Split the invoice line into 2: one for the doi amount and one for the other amount
invoice.invoice_line_ids = [
Command.create(doi_down_payment_so_line._prepare_invoice_line(
name=self._get_down_payment_description(order),
quantity=1.0,
)),
Command.update(invoice_line.id, {
'price_unit': other_down,
}),
]
return invoice

View file

@ -1,13 +1,15 @@
[project]
name = "odoo-bringout-oca-ocb-l10n_it_edi_doi"
version = "16.0.0"
description = "Italy - Declaration of Intent - Odoo addon"
description = "Italy - Declaration of Intent -
Odoo addon
"
authors = [
{ name = "Ernad Husremovic", email = "hernad@bring.out.ba" }
]
dependencies = [
"odoo-bringout-oca-ocb-l10n_it_edi>=16.0.0",
"odoo-bringout-oca-ocb-sale>=16.0.0",
"odoo-bringout-oca-ocb-l10n_it_edi>=19.0.0",
"odoo-bringout-oca-ocb-sale>=19.0.0",
"requests>=2.25.1"
]
readme = "README.md"
@ -17,7 +19,7 @@ classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Office/Business",
]