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

[add] function to get contribution type

parent 9f37df80
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -606,6 +606,19 @@ class ScopPartner(models.Model):
})
partner.scop_period_ids = new_period
def get_partner_contribution_type(self):
"""
Returns list of contribution type for partner
"""
contribution_type = [self.env.ref("cgscop_partner.riga_14397")]
if self.ur_id in [self.env.ref("cgscop_partner.riga_14232"), self.env.ref("cgscop_partner.riga_14243")]:
contribution_type.append(self.env.ref("cgscop_partner.riga_14399"))
if self.is_federation_com:
contribution_type.append(self.env.ref("cgscop_partner.riga_14398"))
if self.is_federation_cae:
contribution_type.append(self.env.ref("cgscop_partner.cotiz_fede_cae"))
return contribution_type
# ------------------------------------------------------
# Override ORM
# ------------------------------------------------------
......@@ -1068,7 +1081,6 @@ class ScopPartner(models.Model):
'target': 'new',
}
# ------------------------------------------------------
# Affichage des coop avec filtre par défaut
# ------------------------------------------------------
......@@ -1192,7 +1204,6 @@ class ScopPartner(models.Model):
}
class ResPartneCertification(models.Model):
_name = "res.partner.certification"
_description = "Certification"
......
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