From 100ea0fbbe2439bb2eb391a7e1cfca4c1bda6359 Mon Sep 17 00:00:00 2001 From: sergiocorato Date: Thu, 24 Oct 2024 17:42:16 +0200 Subject: [PATCH] [IMP] inherit from wizard --- .../wizards/wizard_export_fatturapa.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/l10n_it_fatturapa_out_fd/wizards/wizard_export_fatturapa.py b/l10n_it_fatturapa_out_fd/wizards/wizard_export_fatturapa.py index 1479df43b94..57dd51d4064 100644 --- a/l10n_it_fatturapa_out_fd/wizards/wizard_export_fatturapa.py +++ b/l10n_it_fatturapa_out_fd/wizards/wizard_export_fatturapa.py @@ -7,19 +7,10 @@ class WizardExportFatturapa(models.TransientModel): _inherit = "wizard.export.fatturapa" - @staticmethod - def get_importo(line): + @api.model + def getImporto(self, line): + res = super().getImporto(line) discount_fixed = line.discount_fixed if discount_fixed: return discount_fixed - str_number = str(line.discount) - number = str_number[::-1].find(".") - if number <= 2: - return False - return line.price_unit * line.discount / 100 - - @api.model - def getTemplateValues(self, template_values): - template_values = super().getTemplateValues(template_values) - template_values.update({"get_importo": self.get_importo}) - return template_values + return res