Skip to content

Commit

Permalink
Merge PR #3847 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by sergiocorato
  • Loading branch information
OCA-git-bot committed Feb 27, 2024
2 parents 026442c + 91e7bef commit c16c45b
Show file tree
Hide file tree
Showing 20 changed files with 1,068 additions and 0 deletions.
91 changes: 91 additions & 0 deletions l10n_it_fatturapa_out_oss/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
===========================================
ITA - Fattura elettronica - Emissione - OSS
===========================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:88fe86904abb0356b30b42262b7e64b67957992e2cd4a8321bf89c57f7168ef9
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
:target: https://odoo-community.org/page/development-status
:alt: Alpha
.. |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/14.0/l10n_it_fatturapa_out_oss
: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-14-0/l10n-italy-14-0-l10n_it_fatturapa_out_oss
: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=14.0
:alt: Try me on Runboat

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

**Italiano**

Modulo tecnico di integrazione tra l10n_eu_oss e l10n_it_fatturapa_out

**English**

Technical module for integrating l10n_eu_oss and l10n_it_fatturapa_out

.. IMPORTANT::
This is an alpha version, the data model and design can change at any time without warning.
Only for development or testing purpose, do not use in production.
`More details on development status <https://odoo-community.org/page/development-status>`_

**Table of contents**

.. contents::
:local:

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_oss%0Aversion:%2014.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
~~~~~~~

* Sergio Corato

Contributors
~~~~~~~~~~~~

* Sergio Corato <https://github.com/sergiocorato>

* `TAKOBI <https://takobi.online>`_:

* Lorenzo Battistini

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/14.0/l10n_it_fatturapa_out_oss>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
13 changes: 13 additions & 0 deletions l10n_it_fatturapa_out_oss/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from . import wizard
from odoo import api, SUPERUSER_ID


def _l10n_it_fatturapa_out_oss_post_init(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, {})
oss_taxes = env["account.tax"].search([("oss_country_id", "!=", False)])
oss_taxes.write(
{
"kind_id": env.ref("l10n_it_account_tax_kind.n3_2").id,
"law_reference": "Art. 41 D.L. 331/1993",
}
)
22 changes: 22 additions & 0 deletions l10n_it_fatturapa_out_oss/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2022 Sergio Corato <https://github.com/sergiocorato>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "ITA - Fattura elettronica - Emissione - OSS",
"version": "14.0.1.0.0",
"development_status": "Alpha",
"category": "Localization/Italy",
"summary": "OSS in fatturapa",
"author": "Sergio Corato," "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/l10n-italy",
"license": "AGPL-3",
"depends": [
"l10n_it_fatturapa_out",
"l10n_eu_oss",
],
"data": [
"data/invoice_it_template.xml",
],
"installable": True,
"auto_install": True,
"post_init_hook": "_l10n_it_fatturapa_out_oss_post_init",
}
71 changes: 71 additions & 0 deletions l10n_it_fatturapa_out_oss/data/invoice_it_template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>

<template
id="fatturapa_out_oss_fattura_elettronica_body"
inherit_id="l10n_it_fatturapa_out.account_invoice_it_fattura_elettronica_body"
>
<xpath
expr="//DatiBeniServizi/t[@t-as='tax_data']/DatiRiepilogo"
position="attributes"
>
<attribute
name="t-if"
>not (tax_data.get('Oss Country', False) and tax_data.get('Natura', False))</attribute>
</xpath>
<xpath
expr="//DatiBeniServizi/t[@t-as='tax_data']/DatiRiepilogo"
position="after"
>
<DatiRiepilogo
t-if="tax_data.get('Oss Country', False) and tax_data.get('Natura', False)"
>
<AliquotaIVA>0.00</AliquotaIVA>
<Natura
t-if="tax_data.get('Natura', False)"
t-esc="tax_data['Natura']"
/>
<ImponibileImporto
t-esc="format_monetary(fpa_to_eur(tax_data['ImponibileImporto'], record), euro)"
/>
<Imposta>0.00</Imposta>
<EsigibilitaIVA
t-if="tax_data.get('EsigibilitaIVA', False)"
t-esc="tax_data['EsigibilitaIVA']"
/>
<RiferimentoNormativo
t-if="tax_data.get('RiferimentoNormativo', False)"
t-esc="encode_for_export(tax_data['RiferimentoNormativo'], 100)"
/>
</DatiRiepilogo>
</xpath>
</template>

<template
id="fatturapa_out_oss_line_it_FatturaPA"
inherit_id="l10n_it_fatturapa_out.account_invoice_line_it_FatturaPA"
>
<xpath
expr="//AliquotaIVA[@t-if='not line_is_section_note']"
position="attributes"
>
<attribute
name="t-esc"
>format_numbers(0) if tax_ids and tax_ids.oss_country_id and tax_ids.kind_id else format_numbers(tax_ids.amount)</attribute>
</xpath>
<xpath expr="//AliquotaIVA[@t-if='line_is_section_note']">
<attribute
name="t-esc"
>format_numbers(0) if tax_ids and tax_ids.oss_country_id and tax_ids.kind_id else existing_tax_line['AliquotaIVA']</attribute>
</xpath>
<xpath expr="//DettaglioLinee">
<AltriDatiGestionali
t-if="tax_ids and tax_ids.oss_country_id and tax_ids.kind_id"
>
<TipoDato>OSS</TipoDato>
<RiferimentoTesto t-esc="format_numbers(tax_ids.amount)" />
</AltriDatiGestionali>
</xpath>
</template>

</odoo>
28 changes: 28 additions & 0 deletions l10n_it_fatturapa_out_oss/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_it_fatturapa_out_oss
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-06-22 16:56+0000\n"
"PO-Revision-Date: 2023-04-26 16:05+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: \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 4.14.1\n"

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

#. module: l10n_it_fatturapa_out_oss
#: model:ir.model,name:l10n_it_fatturapa_out_oss.model_l10n_eu_oss_wizard
msgid "l10n.eu.oss.wizard"
msgstr "l10n.eu.oss.wizard"
25 changes: 25 additions & 0 deletions l10n_it_fatturapa_out_oss/i18n/l10n_it_fatturapa_out_oss.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_it_fatturapa_out_oss
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.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_oss
#: model:ir.model,name:l10n_it_fatturapa_out_oss.model_wizard_export_fatturapa
msgid "Export E-invoice"
msgstr ""

#. module: l10n_it_fatturapa_out_oss
#: model:ir.model,name:l10n_it_fatturapa_out_oss.model_l10n_eu_oss_wizard
msgid "l10n.eu.oss.wizard"
msgstr ""

5 changes: 5 additions & 0 deletions l10n_it_fatturapa_out_oss/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
* Sergio Corato <https://github.com/sergiocorato>

* `TAKOBI <https://takobi.online>`_:

* Lorenzo Battistini
7 changes: 7 additions & 0 deletions l10n_it_fatturapa_out_oss/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
**Italiano**

Modulo tecnico di integrazione tra l10n_eu_oss e l10n_it_fatturapa_out

**English**

Technical module for integrating l10n_eu_oss and l10n_it_fatturapa_out
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit c16c45b

Please sign in to comment.