Skip to content
Extraits de code Groupes Projets
Valider 13f2c47f rédigé par Benjamin - Le Filament's avatar Benjamin - Le Filament
Parcourir les fichiers

[UPD] bypass staff check for SCIC coop form

parent daa95dbb
Branches
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -267,9 +267,11 @@ class ScopPartner(models.Model): ...@@ -267,9 +267,11 @@ class ScopPartner(models.Model):
""" """
# Check Staff # Check Staff
staff_line = self.get_last_membership_staff() staff_line = self.get_last_membership_staff()
coop47 = self.env.ref("cgscop_partner.form_coop47")
scic = self.env.ref("cgscop_partner.form_scic")
if ( if (
(not staff_line or staff_line.staff_count < 1) (not staff_line or staff_line.staff_count < 1)
and self.cooperative_form_id != self.env.ref("cgscop_partner.form_coop47") and self.cooperative_form_id not in [coop47, scic]
): ):
raise UserError(_("Les effectifs à l'adhésion ne sont pas renseignés.")) raise UserError(_("Les effectifs à l'adhésion ne sont pas renseignés."))
# Check financial datas # Check financial datas
......
...@@ -46,7 +46,7 @@ class ScopCompulsoryFieldsSuiviWizard(models.TransientModel): ...@@ -46,7 +46,7 @@ class ScopCompulsoryFieldsSuiviWizard(models.TransientModel):
if form_id in form_id._get_lm_form(): if form_id in form_id._get_lm_form():
self.is_scop = True self.is_scop = True
else: else:
self.is_scop = True self.is_scop = False
# ------------------------------------------------------ # ------------------------------------------------------
# Actions / Buttons # Actions / Buttons
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter