Skip to content
Snippets Groups Projects
Commit 64923364 authored by Daniil Digtyar Vasilieva's avatar Daniil Digtyar Vasilieva :call_me: Committed by Enrico Stano
Browse files

[IMP] jump first row (header)

parent eea5a853
No related branches found
No related tags found
2 merge requests!187Release 14.0.1.1.13,!155[IMP] energy_selfconsumption: importation of selfconsumption inscriptions, supply points and distribution tables by CSV
......@@ -30,8 +30,7 @@ class SelfconsumptionImportWizard(models.TransientModel):
distribution_table = self.env['energy_selfconsumption.distribution_table'].create({
'selfconsumption_project_id': project.id
})
for index, single_statement_data in enumerate(parsing_data):
for index, single_statement_data in enumerate(parsing_data[1:]):
self.import_single_statement(single_statement_data, distribution_table)
return True
......@@ -52,7 +51,7 @@ class SelfconsumptionImportWizard(models.TransientModel):
)
decoded_file = data_file.decode(detected_encoding)
csv = reader(StringIO(decoded_file), **csv_options)
return csv
return list(csv)
except BaseException:
logger.warning("Parser error", exc_info=True)
raise UserError(_("Error parsing the file"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment