From 0874858943e05f004a9627738e0fd50fa87e7a68 Mon Sep 17 00:00:00 2001 From: Marco Folco <marcofolco28@gmail.com> Date: Tue, 14 Dec 2021 17:36:19 -0300 Subject: [PATCH] [MOD] tariff import wizard Added control to avoid importing empty lines --- wizard/tariff_import_wizard.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wizard/tariff_import_wizard.py b/wizard/tariff_import_wizard.py index a5a5cdb..d51333c 100644 --- a/wizard/tariff_import_wizard.py +++ b/wizard/tariff_import_wizard.py @@ -203,8 +203,9 @@ class WizardImportTariff(models.TransientModel): values = [] fr = self.file_reader[row_number] if fr: - values.extend([fr[0],fr[3]]) - return values + if fr[0] != '' and fr[3] != '': + values.extend([fr[0],fr[3]]) + return values return False def get_records(self): -- GitLab