diff --git a/l10n_it_fatturapa_out/data/invoice_it_template.xml b/l10n_it_fatturapa_out/data/invoice_it_template.xml index 4093347d6470..436f5ce58a7e 100644 --- a/l10n_it_fatturapa_out/data/invoice_it_template.xml +++ b/l10n_it_fatturapa_out/data/invoice_it_template.xml @@ -1,4 +1,9 @@ + + diff --git a/l10n_it_fatturapa_out/readme/CONTRIBUTORS.rst b/l10n_it_fatturapa_out/readme/CONTRIBUTORS.rst index ec40772373e2..7b2119a407b8 100644 --- a/l10n_it_fatturapa_out/readme/CONTRIBUTORS.rst +++ b/l10n_it_fatturapa_out/readme/CONTRIBUTORS.rst @@ -9,3 +9,6 @@ * `Tecnativa `_: * Víctor Martínez +* `TAKOBI `_: + + * Simone Rubino diff --git a/l10n_it_fatturapa_out/wizard/efattura.py b/l10n_it_fatturapa_out/wizard/efattura.py index d49af3e8ada3..c642051d3986 100644 --- a/l10n_it_fatturapa_out/wizard/efattura.py +++ b/l10n_it_fatturapa_out/wizard/efattura.py @@ -1,5 +1,7 @@ # Copyright 2020 Giuseppe Borruso # Copyright 2020 Marco Colombo +# Copyright 2022 Simone Rubino - TAKOBI +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). import logging import os from datetime import datetime @@ -174,12 +176,12 @@ def get_all_taxes(record): wiz = self.env["wizard.export.fatturapa"] return wiz.getAllTaxes(record) - def get_importo(price_unit, discount): - str_number = str(discount) + def get_importo(line, discount_field='discount'): + str_number = str(line[discount_field]) number = str_number[::-1].find(".") if number <= 2: return False - return price_unit * discount / 100 + return line.price_unit * line.discount / 100 def get_importo_totale(invoice): # wrapper to a method in wizard (for better overriding)