Skip to content

Commit

Permalink
Merge PR #3743 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by eLBati
  • Loading branch information
OCA-git-bot committed Dec 6, 2023
2 parents 0647634 + 2a10933 commit 0c12be5
Show file tree
Hide file tree
Showing 20 changed files with 893 additions and 10 deletions.
18 changes: 9 additions & 9 deletions l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def test_00_xml_import(self):
welfare_found = False
for line in invoice.invoice_line_ids:
if line.product_id.id == self.service.id:
self.assertEqual(line.price_unit, 3)
self.assertAlmostEqual(line.price_unit, 3)
welfare_found = True
self.assertTrue(welfare_found)
self.assertTrue(len(invoice.e_invoice_line_ids) == 1)
Expand Down Expand Up @@ -135,7 +135,7 @@ def test_04_xml_import(self):
self.assertEqual(invoice.invoice_line_ids[1].tax_ids[0].name, "22% e-bill")
self.assertEqual(invoice.invoice_line_ids[0].tax_ids[0].amount, 22)
self.assertEqual(invoice.invoice_line_ids[1].tax_ids[0].amount, 22)
self.assertEqual(invoice.invoice_line_ids[1].price_unit, 2)
self.assertAlmostEqual(invoice.invoice_line_ids[1].price_unit, 2)
self.assertTrue(len(invoice.e_invoice_line_ids) == 2)
for e_line in invoice.e_invoice_line_ids:
self.assertTrue(e_line.line_number in (1, 2))
Expand Down Expand Up @@ -648,10 +648,10 @@ def test_32_xml_import(self):
invoice = self.invoice_model.browse(invoice_id)
self.assertEqual(invoice.move_type, "in_refund")
self.assertEqual(invoice.amount_total, 18.3)
self.assertEqual(invoice.invoice_line_ids[0].price_unit, 2.0)
self.assertAlmostEqual(invoice.invoice_line_ids[0].price_unit, 2.0)
self.assertEqual(invoice.invoice_line_ids[0].quantity, 10.0)
self.assertEqual(invoice.invoice_line_ids[0].price_subtotal, 20.0)
self.assertEqual(invoice.invoice_line_ids[1].price_unit, -1.0)
self.assertAlmostEqual(invoice.invoice_line_ids[1].price_unit, -1.0)
self.assertEqual(invoice.invoice_line_ids[1].quantity, 5.0)
self.assertEqual(invoice.invoice_line_ids[1].price_subtotal, -5.0)

Expand All @@ -662,7 +662,7 @@ def test_33_xml_import(self):
invoice = self.invoice_model.browse(invoice_id)
self.assertEqual(invoice.move_type, "in_refund")
self.assertEqual(round(invoice.amount_total, 2), 24.4)
self.assertEqual(invoice.invoice_line_ids[0].price_unit, 2.0)
self.assertAlmostEqual(invoice.invoice_line_ids[0].price_unit, 2.0)
self.assertEqual(invoice.invoice_line_ids[0].quantity, 10.0)
self.assertEqual(invoice.invoice_line_ids[0].price_subtotal, 20.0)
self.assertEqual(invoice.e_invoice_amount_untaxed, -20.0)
Expand Down Expand Up @@ -815,10 +815,10 @@ def test_46_xml_many_zeros(self):
invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
self.assertEqual(invoice.amount_total, 18.07)
self.assertEqual(invoice.invoice_line_ids[0].price_unit, 18.07)
self.assertAlmostEqual(invoice.invoice_line_ids[0].price_unit, 18.07)
self.assertEqual(invoice.invoice_line_ids[0].quantity, 1.0)
self.assertEqual(invoice.invoice_line_ids[0].price_subtotal, 18.07)
self.assertEqual(invoice.invoice_line_ids[1].price_unit, 16.60)
self.assertAlmostEqual(invoice.invoice_line_ids[1].price_unit, 16.60)
self.assertEqual(invoice.invoice_line_ids[1].quantity, 1.0)
self.assertEqual(invoice.invoice_line_ids[1].price_subtotal, 0.0)

Expand Down Expand Up @@ -1072,9 +1072,9 @@ def test_xml_import_summary_tax_rate(self):
self.assertEqual(invoice.amount_total, 204.16)
self.assertEqual(len(invoice.invoice_line_ids), 2)

self.assertEqual(invoice.invoice_line_ids[0].price_unit, 164.46)
self.assertAlmostEqual(invoice.invoice_line_ids[0].price_unit, 164.46)
self.assertEqual(invoice.invoice_line_ids[0].quantity, 1.0)
self.assertEqual(invoice.invoice_line_ids[1].price_unit, 3.52)
self.assertAlmostEqual(invoice.invoice_line_ids[1].price_unit, 3.52)
self.assertEqual(invoice.invoice_line_ids[1].quantity, 1.0)

def test_e_invoice_field_compute(self):
Expand Down
84 changes: 84 additions & 0 deletions l10n_it_fatturapa_out_triple_discount/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
======================================================
ITA - Fattura elettronica - Integrazione sconto triplo
======================================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:fcbf1f25b3cc5d6de7bd678b47ae99b15e5c9d65f08fb7b5c4a624f293b5320a
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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/14.0/l10n_it_fatturapa_out_triple_discount
: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_triple_discount
: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**

Questo modulo consente di generare correttamente la fattura elettronica (XML) quando il modulo account_invoice_triple_discount è installato.

**English**

The module allows to use correctly generate the Electronic Invoice (XML) when the module account_invoice_triple_discount is installed.

**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_triple_discount%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
~~~~~~~

* Agile Business Group

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

* Simone Rubino
* Alex Comba <[email protected]>
* 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_triple_discount>`_ 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_triple_discount/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import wizards
23 changes: 23 additions & 0 deletions l10n_it_fatturapa_out_triple_discount/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2019 Simone Rubino - Agile Business Group
# Copyright 2023 Simone Rubino - Aion Tech
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
"name": "ITA - Fattura elettronica - Integrazione sconto triplo",
"summary": "Modulo ponte tra emissione " "fatture elettroniche e sconto triplo",
"version": "14.0.1.0.0",
"development_status": "Beta",
"category": "Hidden",
"website": "https://github.com/OCA/l10n-italy"
"/tree/16.0/l10n_it_fatturapa_out_triple_discount",
"author": "Agile Business Group, Odoo Community Association (OCA)",
"license": "AGPL-3",
"auto_install": True,
"depends": [
"l10n_it_fatturapa_out",
"account_invoice_triple_discount",
],
"data": [
"data/invoice_it_template.xml",
],
}
27 changes: 27 additions & 0 deletions l10n_it_fatturapa_out_triple_discount/data/invoice_it_template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
~ Copyright 2023 Simone Rubino - Aion Tech
~ License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-->
<odoo>
<template
id="account_invoice_it_triple_discount"
inherit_id="l10n_it_fatturapa_out.account_invoice_line_it_sconto_maggiorazione"
>
<ScontoMaggiorazione position="after">
<t
t-set="triple_ScontoMaggiorazione_values_list"
t-value="get_triple_ScontoMaggiorazione_values_list(line)"
/>
<t
t-foreach="triple_ScontoMaggiorazione_values_list"
t-as="ScontoMaggiorazione_values"
>
<ScontoMaggiorazione t-translation="off">
<Tipo t-esc="ScontoMaggiorazione_values['Tipo']" />
<Percentuale t-esc="ScontoMaggiorazione_values['Percentuale']" />
</ScontoMaggiorazione>
</t>
</ScontoMaggiorazione>
</template>
</odoo>
22 changes: 22 additions & 0 deletions l10n_it_fatturapa_out_triple_discount/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_it_fatturapa_out_triple_discount
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-04-26 16:05+0000\n"
"Last-Translator: mymage <[email protected]>\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 4.14.1\n"

#. module: l10n_it_fatturapa_out_triple_discount
#: model:ir.model,name:l10n_it_fatturapa_out_triple_discount.model_wizard_export_fatturapa
msgid "Export E-invoice"
msgstr "Esporta e-fattura"
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_it_fatturapa_out_triple_discount
#
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_triple_discount
#: model:ir.model,name:l10n_it_fatturapa_out_triple_discount.model_wizard_export_fatturapa
msgid "Export E-invoice"
msgstr ""

3 changes: 3 additions & 0 deletions l10n_it_fatturapa_out_triple_discount/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* Simone Rubino
* Alex Comba <[email protected]>
* Lorenzo Battistini
7 changes: 7 additions & 0 deletions l10n_it_fatturapa_out_triple_discount/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
**Italiano**

Questo modulo consente di generare correttamente la fattura elettronica (XML) quando il modulo account_invoice_triple_discount è installato.

**English**

The module allows to use correctly generate the Electronic Invoice (XML) when the module account_invoice_triple_discount is installed.
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 0c12be5

Please sign in to comment.