diff --git a/l10n_it_fatturapa_out/data/invoice_it_template.xml b/l10n_it_fatturapa_out/data/invoice_it_template.xml index 7a5aa422dfe0..1e5e4d287be7 100644 --- a/l10n_it_fatturapa_out/data/invoice_it_template.xml +++ b/l10n_it_fatturapa_out/data/invoice_it_template.xml @@ -1,4 +1,8 @@ + + + + + + diff --git a/l10n_it_fatturapa_out_triple_discount/i18n/l10n_it_fatturapa_out_triple_discount.pot b/l10n_it_fatturapa_out_triple_discount/i18n/l10n_it_fatturapa_out_triple_discount.pot new file mode 100644 index 000000000000..becb7d6545c3 --- /dev/null +++ b/l10n_it_fatturapa_out_triple_discount/i18n/l10n_it_fatturapa_out_triple_discount.pot @@ -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 "" + diff --git a/l10n_it_fatturapa_out_triple_discount/readme/CONTRIBUTORS.rst b/l10n_it_fatturapa_out_triple_discount/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000000..ff7aa2b6cb2a --- /dev/null +++ b/l10n_it_fatturapa_out_triple_discount/readme/CONTRIBUTORS.rst @@ -0,0 +1,9 @@ +* Simone Rubino +* Alex Comba +* `Ooops `_: + + * Giovanni Serra + +* `TAKOBI `_: + + * Simone Rubino diff --git a/l10n_it_fatturapa_out_triple_discount/readme/DESCRIPTION.rst b/l10n_it_fatturapa_out_triple_discount/readme/DESCRIPTION.rst new file mode 100644 index 000000000000..a8f5c180e799 --- /dev/null +++ b/l10n_it_fatturapa_out_triple_discount/readme/DESCRIPTION.rst @@ -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. diff --git a/l10n_it_fatturapa_out_triple_discount/static/description/icon.png b/l10n_it_fatturapa_out_triple_discount/static/description/icon.png new file mode 100644 index 000000000000..3a0328b516c4 Binary files /dev/null and b/l10n_it_fatturapa_out_triple_discount/static/description/icon.png differ diff --git a/l10n_it_fatturapa_out_triple_discount/static/description/index.html b/l10n_it_fatturapa_out_triple_discount/static/description/index.html new file mode 100644 index 000000000000..57d5351364de --- /dev/null +++ b/l10n_it_fatturapa_out_triple_discount/static/description/index.html @@ -0,0 +1,423 @@ + + + + + + +ITA - Fattura elettronica - Integrazione sconto triplo + + + +
+

ITA - Fattura elettronica - Integrazione sconto triplo

+ + +

Beta License: AGPL-3 OCA/l10n-italy Translate me on Weblate Try me on Runbot

+

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

+ +
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +feedback.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Agile Business Group
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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 project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/l10n_it_fatturapa_out_triple_discount/tests/__init__.py b/l10n_it_fatturapa_out_triple_discount/tests/__init__.py new file mode 100644 index 000000000000..b94706388956 --- /dev/null +++ b/l10n_it_fatturapa_out_triple_discount/tests/__init__.py @@ -0,0 +1,6 @@ +# Copyright 2019 Simone Rubino - Agile Business Group +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +# tests disabled because unstable +# TODO https://github.com/OCA/l10n-italy/issues/1588 +# from . import test_fatturapa_triple_discount diff --git a/l10n_it_fatturapa_out_triple_discount/tests/data/IT06363391001_00001.xml b/l10n_it_fatturapa_out_triple_discount/tests/data/IT06363391001_00001.xml new file mode 100644 index 000000000000..f8c8ead0c09f --- /dev/null +++ b/l10n_it_fatturapa_out_triple_discount/tests/data/IT06363391001_00001.xml @@ -0,0 +1,111 @@ + + + + + + IT + 06363391001 + + 00001 + FPA12 + UFPQ1O + + 06543534343 + info@yourcompany.example.com + + + + + + IT + 06363391001 + + + YourCompany + + RF01 + + + Via Milano, 1 + 00100 + Roma + AK + IT + + + 06543534343 + info@yourcompany.example.com + + + + + + IT + 00146089990 + + 00146089990 + + Public Administration + + + + Via Roma, 1 + 10100 + Torino + AK + IT + + + + + + + TD01 + EUR + 2016-01-07 + INV/2016/0013 + 1.53 + SI + + + + + 1 + Mouse Optical + 1.000 + Unit(s) + 10.00000 + + SC + 50.00 + + + SC + 50.00 + + + SC + 50.00 + + 1.25 + 22.00 + + + 22.00 + 1.25 + 0.28 + + + + TP02 + + MP05 + 2016-02-29 + 1.53 + + + + diff --git a/l10n_it_fatturapa_out_triple_discount/tests/test_fatturapa_triple_discount.py b/l10n_it_fatturapa_out_triple_discount/tests/test_fatturapa_triple_discount.py new file mode 100644 index 000000000000..fa981de83676 --- /dev/null +++ b/l10n_it_fatturapa_out_triple_discount/tests/test_fatturapa_triple_discount.py @@ -0,0 +1,58 @@ +# Copyright 2019 Simone Rubino - Agile Business Group +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +import codecs + +from odoo.addons.l10n_it_fatturapa_out.tests.fatturapa_common import FatturaPACommon + + +class TestInvoiceTripleDiscount(FatturaPACommon): + def setUp(self): + super(TestInvoiceTripleDiscount, self).setUp() + + def test_xml_export_triple_discount(self): + self.set_sequences(13, "2016-01-07") + invoice = self.invoice_model.create( + { + "date_invoice": "2016-01-07", + "partner_id": self.res_partner_fatturapa_0.id, + "journal_id": self.sales_journal.id, + "account_id": self.a_recv.id, + "payment_term_id": self.account_payment_term.id, + "user_id": self.user_demo.id, + "type": "out_invoice", + "currency_id": self.EUR.id, + "invoice_line_ids": [ + ( + 0, + 0, + { + "account_id": self.a_sale.id, + "product_id": self.product_product_10.id, + "name": "Mouse\nOptical", + "quantity": 1, + "uom_id": self.product_uom_unit.id, + "price_unit": 10, + "discount": 50, + "discount2": 50, + "discount3": 50, + "invoice_line_tax_ids": [(6, 0, {self.tax_22.id})], + }, + ) + ], + } + ) + invoice.action_invoice_open() + res = self.run_wizard(invoice.id) + + self.assertTrue(res) + attachment = self.attach_model.browse(res["res_id"]) + self.set_e_invoice_file_id(attachment, "IT06363391001_00001.xml") + + # XML doc to be validated + xml_content = codecs.decode(attachment.datas, "base64") + self.check_content( + xml_content, + "IT06363391001_00001.xml", + module_name="l10n_it_fatturapa_out_triple_discount", + ) diff --git a/setup/l10n_it_fatturapa_out_triple_discount/odoo/addons/l10n_it_fatturapa_out_triple_discount b/setup/l10n_it_fatturapa_out_triple_discount/odoo/addons/l10n_it_fatturapa_out_triple_discount new file mode 120000 index 000000000000..d9a703866cc5 --- /dev/null +++ b/setup/l10n_it_fatturapa_out_triple_discount/odoo/addons/l10n_it_fatturapa_out_triple_discount @@ -0,0 +1 @@ +../../../../l10n_it_fatturapa_out_triple_discount \ No newline at end of file diff --git a/setup/l10n_it_fatturapa_out_triple_discount/setup.py b/setup/l10n_it_fatturapa_out_triple_discount/setup.py new file mode 100644 index 000000000000..28c57bb64031 --- /dev/null +++ b/setup/l10n_it_fatturapa_out_triple_discount/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)