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

[IMP] energy_selfconsumption: new partner_id field in supply point

parent c3b443bf
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
......@@ -8,7 +8,10 @@ class SupplyPoint(models.Model):
name = fields.Char(required=True)
code = fields.Char(string="CUPS", required=True)
owner_id = fields.Many2one("res.partner", string="Owner", required=True)
owner_id = fields.Many2one("res.partner", string="Owner", required=True,
help="Partner with the legal obligation of the supply point")
partner_id = fields.Many2one("res.partner", string="Partner", required=True,
help="Partner subscribed to the self-consumption project")
company_id = fields.Many2one(
"res.company", default=lambda self: self.env.company, readonly=True
)
......
......@@ -17,6 +17,7 @@
<group>
<group>
<field name="code"/>
<field name="partner_id"/>
<field name="owner_id"/>
</group>
<group>
......@@ -65,6 +66,7 @@
<tree string="Supply Points">
<field name="name"/>
<field name="code"/>
<field name="partner_id"/>
<field name="owner_id"/>
</tree>
</field>
......
......@@ -107,5 +107,5 @@ class SelfconsumptionImportWizard(models.TransientModel):
'zip': zip,
'country_id': country.id,
'owner_id': owner.id,
'cooperator_id': owner.id # TODO move it to other module
'partner_id': partner.id
})
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