diff --git a/models/scop_cotisation_cg_exo.py b/models/scop_cotisation_cg_exo.py index 38ecccb84405a4d437bcf16b331bf627ed9077f9..82b77f5d98fe553e52c7d46cc84cd45b4818a5a4 100644 --- a/models/scop_cotisation_cg_exo.py +++ b/models/scop_cotisation_cg_exo.py @@ -335,6 +335,13 @@ class ScopCotisationExo(models.Model): raise UserError( _("Il est nécessaire de renseigner une date d'acceptation pour valider") ) + elif not self.exo_line_ids: + raise UserError( + _( + "Aucune ligne d'exonération n'a été créée. " + "Veuillez cliquer sur le bouton Créer/Mettre à jour les lignes" + ) + ) else: # Unfavorable => nothing to do if self.final_notice == "unfavorable":