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

[IMP] energy_selfconsumption: update method name

parent 20e761c9
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
......@@ -31,7 +31,7 @@ class SelfconsumptionImportWizard(models.TransientModel):
project = self.env['energy_selfconsumption.selfconsumption'].browse(active_id)
parsing_errors = []
for index, single_statement_data in enumerate(parsing_data[1:]):
found = self.import_single_statement(single_statement_data, project)
found = self.import_line(single_statement_data, project)
if not found:
parsing_errors.append((index, single_statement_data))
if parsing_errors:
......@@ -65,7 +65,7 @@ class SelfconsumptionImportWizard(models.TransientModel):
logger.warning("Parser error", exc_info=True)
raise UserError(_("Error parsing the file"))
def import_single_statement(self, line, project):
def import_line(self, line, project):
partner = self.env['res.partner'].search([
'|', ('vat', '=', line[0]), ('vat', '=ilike', line[0])
], limit=1)
......
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