From 1e862c343b5ec9e9e324d7041d0e5975858025b7 Mon Sep 17 00:00:00 2001 From: Marco Colombo Date: Fri, 14 Jan 2022 13:06:28 +0100 Subject: [PATCH] [IMP] l10n_it_fatturapa_out_sp: supporto per la conversione degli importi in EUR per fatture in valuta estera --- l10n_it_fatturapa_out_sp/__init__.py | 3 +++ l10n_it_fatturapa_out_sp/__manifest__.py | 6 ++---- .../view/invoice_it_template.xml | 18 ------------------ l10n_it_fatturapa_out_sp/wizard/__init__.py | 3 +++ .../wizard/wizard_export_fatturapa.py | 15 +++++++++++++++ 5 files changed, 23 insertions(+), 22 deletions(-) delete mode 100644 l10n_it_fatturapa_out_sp/view/invoice_it_template.xml create mode 100644 l10n_it_fatturapa_out_sp/wizard/__init__.py create mode 100644 l10n_it_fatturapa_out_sp/wizard/wizard_export_fatturapa.py diff --git a/l10n_it_fatturapa_out_sp/__init__.py b/l10n_it_fatturapa_out_sp/__init__.py index e69de29bb2d1..4b19b1a70022 100644 --- a/l10n_it_fatturapa_out_sp/__init__.py +++ b/l10n_it_fatturapa_out_sp/__init__.py @@ -0,0 +1,3 @@ +# Copyright 2022 Marco Colombo + +from . import wizard diff --git a/l10n_it_fatturapa_out_sp/__manifest__.py b/l10n_it_fatturapa_out_sp/__manifest__.py index 739439cecb85..b7f11ae291f3 100644 --- a/l10n_it_fatturapa_out_sp/__manifest__.py +++ b/l10n_it_fatturapa_out_sp/__manifest__.py @@ -7,14 +7,12 @@ "category": "Localization/Italy", "summary": "Scissione pagamenti in fatturapa", "author": "Marco Colombo," "Odoo Community Association (OCA)", - "website": "https://github.com/OCA/l10n-italy" "l10n_it_fatturapa_out_sp", + "website": "https://github.com/OCA/l10n-italy", "license": "AGPL-3", "depends": [ "l10n_it_fatturapa_out", "l10n_it_split_payment", ], - "data": [ - "view/invoice_it_template.xml", - ], "installable": True, + "autoinstall": True, } diff --git a/l10n_it_fatturapa_out_sp/view/invoice_it_template.xml b/l10n_it_fatturapa_out_sp/view/invoice_it_template.xml deleted file mode 100644 index a106a951f782..000000000000 --- a/l10n_it_fatturapa_out_sp/view/invoice_it_template.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - diff --git a/l10n_it_fatturapa_out_sp/wizard/__init__.py b/l10n_it_fatturapa_out_sp/wizard/__init__.py new file mode 100644 index 000000000000..cf085ece47be --- /dev/null +++ b/l10n_it_fatturapa_out_sp/wizard/__init__.py @@ -0,0 +1,3 @@ +# Copyright 2022 Marco Colombo + +from . import wizard_export_fatturapa diff --git a/l10n_it_fatturapa_out_sp/wizard/wizard_export_fatturapa.py b/l10n_it_fatturapa_out_sp/wizard/wizard_export_fatturapa.py new file mode 100644 index 000000000000..be1e12e8af8e --- /dev/null +++ b/l10n_it_fatturapa_out_sp/wizard/wizard_export_fatturapa.py @@ -0,0 +1,15 @@ +# Copyright 2022 Marco Colombo +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import api, models + + +class WizardExportFatturapa(models.TransientModel): + _inherit = "wizard.export.fatturapa" + + @api.model + def getImportoTotale(self, invoice): + amount_total = super().getImportoTotale(invoice) + if invoice.split_payment: + amount_total += invoice.amount_sp + return amount_total