Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions l10n_it_fatturapa_out/data/invoice_it_template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@ e 'line' per riga di fattura (a seconda del livello in cui sono chiamati)
<t t-set="related_receptions" t-value="record.related_documents.browse()" />
<t t-set="related_invoices" t-value="record.related_documents.browse()" />
<t t-set="line_counter" t-value="0" />
<t
t-foreach="record.invoice_line_ids.sorted(key=lambda l: (-l.sequence, l.date, l.move_name, -l.id), reverse=True)"
t-as="line"
>
<t t-foreach="wizard.get_e_invoice_lines(record)" t-as="line">
<t t-set="line_counter" t-value="line_counter + 1" />
<t
t-foreach="line.related_documents.filtered(lambda doc: doc.type == 'order')"
Expand Down Expand Up @@ -585,10 +582,7 @@ e 'line' per riga di fattura (a seconda del livello in cui sono chiamati)
<DatiBeniServizi>
<!-- Invoice lines. -->
<t t-set="line_counter" t-value="0" />
<t
t-foreach="record.invoice_line_ids.sorted(key=lambda l: (-l.sequence, l.date, l.move_name, -l.id), reverse=True)"
t-as="line"
>
<t t-foreach="wizard.get_e_invoice_lines(record)" t-as="line">
<t t-set="line_counter" t-value="line_counter + 1" />
<t
t-call="l10n_it_fatturapa_out.account_invoice_line_it_FatturaPA"
Expand Down
13 changes: 13 additions & 0 deletions l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,19 @@ def getTemplateValues(self, template_values):
"""
return template_values

@api.model
def get_e_invoice_lines(self, invoice):
"""
Invoice lines are not all to be translated to e-invoice lines.

For instance, some invoice lines will be translated
to DatiCassaPrevidenziale nodes.
"""
return invoice.invoice_line_ids.sorted(
key=lambda li: (-li.sequence, li.date, li.move_name, -li.id),
reverse=True,
)

def group_invoices_by_partner(self):
def split_list(my_list, size):
it = iter(my_list)
Expand Down
111 changes: 111 additions & 0 deletions l10n_it_fatturapa_out_dn/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
===========================================
ITA - Fattura elettronica - Emissione - DDT
===========================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:2706a59336191ab7d84793fb612773e74e2c16739c7ac04ec963d8a746dd5be3
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github
:target: https://github.com/OCA/l10n-italy/tree/16.0/l10n_it_fatturapa_out_dn
:alt: OCA/l10n-italy
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/l10n-italy-16-0/l10n-italy-16-0-l10n_it_fatturapa_out_dn
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-italy&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

**Italiano**

Questo modulo consente di aggiungere le informazione relative ai DDT al
file XML della fattura elettronica versione 1.6.

https://www.fatturapa.gov.it/export/documenti/Specifiche_tecniche_del_formato_FatturaPA_V1.3.1.pdf

da inviare al Sistema di Interscambio (SdI).

https://www.fatturapa.gov.it/it/sistemainterscambio/cose-il-sdi/

**English**

This module allows you to add DDT information to the Electronic Invoice
XML file version 1.6

https://www.fatturapa.gov.it/export/documenti/Specifiche_tecniche_del_formato_FatturaPA_V1.3.1.pdf

to be sent to the Exchange System (ES).

https://www.fatturapa.gov.it/en/

**Table of contents**

.. contents::
:local:

Known issues / Roadmap
======================

There are a couple of minor issues since l10n_it_delivery_note only
links a Note line of the invoice to the delivery note:

- RiferimentoNumeroLinea refers to a descriptive line, but it should
enumerate (at least) the products lines
- RiferimentoNumeroLinea is always populated, but it should only be
populated when the linked lines are not all the invoice lines

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-italy/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_fatturapa_out_dn%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Marco Colombo

Contributors
------------

- Marco Colombo
<`https://github.com/TheMule71\\> <https://github.com/TheMule71\>>`__
- `TAKOBI <https://takobi.online>`__:

- Simone Rubino <sir@takobi.online>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/l10n-italy <https://github.com/OCA/l10n-italy/tree/16.0/l10n_it_fatturapa_out_dn>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions l10n_it_fatturapa_out_dn/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import wizard
22 changes: 22 additions & 0 deletions l10n_it_fatturapa_out_dn/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2021 Marco Colombo
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "ITA - Fattura elettronica - Emissione - DDT",
"version": "16.0.1.0.0",
"development_status": "Beta",
"category": "Localization/Italy",
"summary": "DDT in fatture elettroniche",
"author": "Marco Colombo," "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/l10n-italy",
"license": "AGPL-3",
"depends": [
"l10n_it_fatturapa_out",
"l10n_it_delivery_note",
],
"data": [
"data/invoice_it_template.xml",
"wizard/wizard_export_fatturapa_view.xml",
"security/ir.model.access.csv",
],
"installable": True,
}
30 changes: 30 additions & 0 deletions l10n_it_fatturapa_out_dn/data/invoice_it_template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
~ Copyright 2022 Simone Rubino - TAKOBI
~ License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-->
<odoo>
<template
id="account_invoice_it_dati_ddt"
inherit_id="l10n_it_fatturapa_out.account_invoice_it_dati_ddt"
priority="99"
>
<xpath expr="t" position="replace">
<t t-if="wizard.include_transport_data == 'dati_dn'">
<!--2.1.8-->
<DatiDDT t-foreach="wizard.getDatiDDT(record)" t-as="DatiDDT">
<NumeroDDT
t-esc="encode_for_export(DatiDDT.get('NumeroDDT'), 20)"
/>
<DataDDT t-esc="format_date(DatiDDT.get('DataDDT'))" />
<RiferimentoNumeroLinea
t-if="DatiDDT.get('RiferimentoNumeroLinea')"
t-foreach="DatiDDT.get('RiferimentoNumeroLinea')"
t-as="NumeroLinea"
t-esc="NumeroLinea"
/>
</DatiDDT>
</t>
</xpath>
</template>
</odoo>
56 changes: 56 additions & 0 deletions l10n_it_fatturapa_out_dn/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_it_fatturapa_out_dn
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2025-05-12 09:24+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.10.4\n"

#. module: l10n_it_fatturapa_out_dn
#: model:ir.model.fields,field_description:l10n_it_fatturapa_out_dn.field_wizard_export_fatturapa__include_transport_data
msgid "DN Data"
msgstr "Dati DdT"

#. module: l10n_it_fatturapa_out_dn
#: model:ir.model.fields,field_description:l10n_it_fatturapa_out_dn.field_wizard_export_fatturapa__display_name
msgid "Display Name"
msgstr "Nome visualizzato"

#. module: l10n_it_fatturapa_out_dn
#: model:ir.model,name:l10n_it_fatturapa_out_dn.model_wizard_export_fatturapa
msgid "Export E-invoice"
msgstr "Esporta e-fattura"

#. module: l10n_it_fatturapa_out_dn
#: model:ir.model.fields,field_description:l10n_it_fatturapa_out_dn.field_wizard_export_fatturapa__id
msgid "ID"
msgstr "ID"

#. module: l10n_it_fatturapa_out_dn
#: model:ir.model.fields.selection,name:l10n_it_fatturapa_out_dn.selection__wizard_export_fatturapa__include_transport_data__dati_dn
msgid "Include DN Data"
msgstr "Includi dati DdT"

#. module: l10n_it_fatturapa_out_dn
#: model:ir.model.fields,help:l10n_it_fatturapa_out_dn.field_wizard_export_fatturapa__include_transport_data
msgid ""
"Include DN data: The field must be entered when a transport document "
"associated with a deferred invoice is present"
msgstr ""
"Includi dati DDT: il campo deve essere inserito quando è presente un "
"documento di trasporto associato ad una fattura differita"

#. module: l10n_it_fatturapa_out_dn
#: model:ir.model.fields,field_description:l10n_it_fatturapa_out_dn.field_wizard_export_fatturapa____last_update
msgid "Last Modified on"
msgstr "Ultima modifica il"
51 changes: 51 additions & 0 deletions l10n_it_fatturapa_out_dn/i18n/l10n_it_fatturapa_out_dn.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_it_fatturapa_out_dn
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: l10n_it_fatturapa_out_dn
#: model:ir.model.fields,field_description:l10n_it_fatturapa_out_dn.field_wizard_export_fatturapa__include_transport_data
msgid "DN Data"
msgstr ""

#. module: l10n_it_fatturapa_out_dn
#: model:ir.model.fields,field_description:l10n_it_fatturapa_out_dn.field_wizard_export_fatturapa__display_name
msgid "Display Name"
msgstr ""

#. module: l10n_it_fatturapa_out_dn
#: model:ir.model,name:l10n_it_fatturapa_out_dn.model_wizard_export_fatturapa
msgid "Export E-invoice"
msgstr ""

#. module: l10n_it_fatturapa_out_dn
#: model:ir.model.fields,field_description:l10n_it_fatturapa_out_dn.field_wizard_export_fatturapa__id
msgid "ID"
msgstr ""

#. module: l10n_it_fatturapa_out_dn
#: model:ir.model.fields.selection,name:l10n_it_fatturapa_out_dn.selection__wizard_export_fatturapa__include_transport_data__dati_dn
msgid "Include DN Data"
msgstr ""

#. module: l10n_it_fatturapa_out_dn
#: model:ir.model.fields,help:l10n_it_fatturapa_out_dn.field_wizard_export_fatturapa__include_transport_data
msgid ""
"Include DN data: The field must be entered when a transport document "
"associated with a deferred invoice is present"
msgstr ""

#. module: l10n_it_fatturapa_out_dn
#: model:ir.model.fields,field_description:l10n_it_fatturapa_out_dn.field_wizard_export_fatturapa____last_update
msgid "Last Modified on"
msgstr ""
3 changes: 3 additions & 0 deletions l10n_it_fatturapa_out_dn/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
3 changes: 3 additions & 0 deletions l10n_it_fatturapa_out_dn/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Marco Colombo \<https://github.com/TheMule71\>
- [TAKOBI](https://takobi.online):
- Simone Rubino \<sir@takobi.online\>
21 changes: 21 additions & 0 deletions l10n_it_fatturapa_out_dn/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
**Italiano**

Questo modulo consente di aggiungere le informazione relative ai DDT al
file XML della fattura elettronica versione 1.6.

<https://www.fatturapa.gov.it/export/documenti/Specifiche_tecniche_del_formato_FatturaPA_V1.3.1.pdf>

da inviare al Sistema di Interscambio (SdI).

<https://www.fatturapa.gov.it/it/sistemainterscambio/cose-il-sdi/>

**English**

This module allows you to add DDT information to the Electronic Invoice
XML file version 1.6

<https://www.fatturapa.gov.it/export/documenti/Specifiche_tecniche_del_formato_FatturaPA_V1.3.1.pdf>

to be sent to the Exchange System (ES).

<https://www.fatturapa.gov.it/en/>
7 changes: 7 additions & 0 deletions l10n_it_fatturapa_out_dn/readme/ROADMAP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
There are a couple of minor issues since l10n_it_delivery_note only
links a Note line of the invoice to the delivery note:

- RiferimentoNumeroLinea refers to a descriptive line, but it should
enumerate (at least) the products lines
- RiferimentoNumeroLinea is always populated, but it should only be
populated when the linked lines are not all the invoice lines
2 changes: 2 additions & 0 deletions l10n_it_fatturapa_out_dn/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_wizard_export_fatturapa,access_wizard_export_fatturapa,model_wizard_export_fatturapa,account.group_account_invoice,1,1,1,1
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading