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

[IMP] required to project_id

parent 7d003d97
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
......@@ -15,7 +15,7 @@ class DistributionTable(models.Model):
_description = 'Distribution Table'
name = fields.Char()
selfconsumption_project_id = fields.Many2one('energy_selfconsumption.selfconsumption')
selfconsumption_project_id = fields.Many2one('energy_selfconsumption.selfconsumption', required=True)
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')
......@@ -61,7 +61,7 @@
<field
name="distribution_table_id"
attrs="{'readonly': [('state', 'not in', ['draft', 'activation'])]}"
domain="[('state', 'not in', ['draft']), '|', ('selfconsumption_project_id', '=', id), ('selfconsumption_project_id', '=', False)]"
domain="[('state', 'not in', ['draft']), ('selfconsumption_project_id', '=', id)]"
options="{'no_create': True}"
/>
</group>
......
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