Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0][MIG] l10n_it_fatturapa_out_triple_discount #3743

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
3ef208c
[ADD] l10n_it_fatturapa_out_triple_discount
SimoRubi Jan 22, 2019
ad2845d
[UPD] Update l10n_it_fatturapa_out_triple_discount.pot
oca-travis Feb 1, 2019
c1ce6e4
FIX l10n_it_fatturapa_out_triple_discount adapt to new set_sequences …
eLBati Mar 7, 2019
3af36f5
[ADD] icon.png
OCA-git-bot Apr 3, 2019
a29ea87
l10n_it_fatturapa: xml doctor for fatturapa
sherpya May 3, 2019
61b072a
[UPD] README.rst
OCA-git-bot Jul 29, 2019
b147016
[MIG] 10n_it_fatturapa_out_triple_discount: Migration to 12.0
tafaRU Dec 17, 2019
f0516b2
[UPD] Update l10n_it_fatturapa_out_triple_discount.pot
oca-travis Jan 3, 2020
b2430c5
[UPD] README.rst
OCA-git-bot Jan 3, 2020
72415c4
Use float_round from odoo because in python 3 "Exact halfway cases ar…
eLBati Jan 14, 2020
612dc6a
l10n_it_fatturapa_out_triple_discount 12.0.1.0.1
OCA-git-bot Jan 15, 2020
5b111bf
l10n_it_fatturapa_out_triple_discount: disable tests because unstable
eLBati Jan 21, 2020
8a6af8b
l10n_it_fatturapa_out_triple_discount 12.0.1.0.2
OCA-git-bot Jan 22, 2020
149a7f6
merge PR 1264 1717 1728 1737 1739
May 13, 2020
9cf27a5
FIX license LGPL-3 conflicts
eLBati Sep 24, 2020
01d9687
l10n_it_fatturapa_out_triple_discount 12.0.1.0.4
OCA-git-bot Sep 24, 2020
decb141
[12.0][IMP] l10n_it_fatturapa_out and l10n_it_fatturapa_out_triple_di…
tafaRU Sep 11, 2020
fb0a98a
l10n_it_fatturapa_out_triple_discount 12.0.2.0.0
OCA-git-bot Oct 2, 2020
52edfe7
[FIX][l10n_it_fatturapa_out_triple_discount] change rounding to avoid…
Apr 12, 2021
fa1619e
l10n_it_fatturapa_out_triple_discount 12.0.2.0.1
OCA-git-bot Apr 15, 2021
3a35943
Manually fix manifest website key
SirTakobi Aug 5, 2022
64deb96
Added translation using Weblate (Italian)
mymage Apr 26, 2023
ea07ea7
Translated using Weblate (Italian)
mymage Apr 26, 2023
ad13800
[UPD] README.rst
OCA-git-bot Sep 3, 2023
4081537
Update translation files
weblate Sep 21, 2023
cb5517c
[IMP] l10n_it_fatturapa_out_triple_discount: pre-commit execution
SirAionTech Nov 15, 2023
0e4a4d7
[MIG] l10n_it_fatturapa_out_triple_discount: Migration to 16.0
SirAionTech Nov 15, 2023
0a0345a
pre-commit and metadata
eLBati Nov 28, 2023
51d9381
Adapt tests to v14
eLBati Nov 28, 2023
2a10933
Use assertAlmostEqual for fields which could be result of computation
eLBati Nov 28, 2023
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
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
Loading