Skip to content
Snippets Groups Projects
Commit 194216d3 authored by Daniil Digtyar Vasilieva's avatar Daniil Digtyar Vasilieva :call_me:
Browse files

[IMP] added type field

parent 499ea486
No related branches found
No related tags found
3 merge requests!138Hotfix setup name error,!134Release v14.0.1.1.6,!126[IMP] Feature/add energy selfconsumption distribution table
......@@ -5,11 +5,17 @@ STATE_VALUES = [
("active", _("Active")),
]
TYPE_VALUES = [
("fixed", _("Fixed")),
("horary", _("Horary")),
]
class DistributionTable(models.Model):
_name = 'energy_selfconsumption.distribution_table'
_description = 'Distribution Table'
name = fields.Char()
selfconsumption_project_id = fields.Many2one('energy_selfconsumption.selfconsumption')
type = fields.Selection(TYPE_VALUES, default="fixed", required=True, string="Modality")
state = fields.Selection(STATE_VALUES, default="draft", required=True)
supply_point_assignation_ids = fields.One2many('energy_selfconsumption.supply_point_assignation', 'distribution_table_id')
......@@ -23,7 +23,10 @@
</h1>
</div>
<group>
<field name="selfconsumption_project_id"/>
<group>
<field name="selfconsumption_project_id"/>
<field name="type"/>
</group>
<field
name="supply_point_assignation_ids"
widget="one2many"
......
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