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

[IMP] energy_selfconsumption: validate invoicing mode before activation

parent b07f6be6
No related branches found
No related tags found
3 merge requests!253[REL] Release 06/11/23,!228[IMP] energy_selfconsumption: integration invoicing,!211[IMP] energy_selfconsumption: invoicing acquired power
......@@ -172,6 +172,10 @@ class Selfconsumption(models.Model):
raise ValidationError(_("Project must have a valid CIL."))
if not record.power or record.power <= 0:
raise ValidationError(_("Project must have a valid Rated Power."))
if not record.invoicing_mode:
raise ValidationError(
_("Project must have defined a invoicing mode before activation.")
)
# Create ContractGenerationWizard
contract_wizard = self.env[
......
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