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

[IMP] energy_selfconsumption: create inscriptions with effective date or today date

parent 32ded007
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
......@@ -71,7 +71,7 @@ class SelfconsumptionImportWizard(models.TransientModel):
def get_line_dict(self, line):
return {
"partner_vat": line[0] or False,
"effective_date": line[1] or False,
"effective_date": line[1] or fields.date.today(),
"code": line[2] or False,
"street": line[3] or False,
"street2": line[4] or False,
......@@ -129,12 +129,12 @@ class SelfconsumptionImportWizard(models.TransientModel):
{
"project_id": project.id,
"partner_id": partner.id,
"effective_date": fields.date.today(),
"effective_date": line_dict["effective_date"],
}
)
except:
return False, _("Could not create inscription for {vat}.").format(
vat=line_dict["partner_vat"]
except Exception as e:
return False, _("Could not create inscription for {vat}. {error}").format(
vat=line_dict["partner_vat"], error=e
)
supply_point = self.env["energy_selfconsumption.supply_point"].search(
......
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