Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
C
cgscop_adhesion
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse du dépôt
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté GitLab
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Le Filament
Confédération Générale des SCOP
cgscop_adhesion
Validations
dfbeeefd
Valider
dfbeeefd
rédigé
20 mai 2021
par
jordan
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
[clean] comment functions
parent
402aa219
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
1
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
1 fichier modifié
models/res_partner.py
+29
-2
29 ajouts, 2 suppressions
models/res_partner.py
avec
29 ajouts
et
2 suppressions
models/res_partner.py
+
29
−
2
Voir le fichier @
dfbeeefd
...
@@ -90,6 +90,7 @@ class ScopPartner(models.Model):
...
@@ -90,6 +90,7 @@ class ScopPartner(models.Model):
# ------------------------------------------------------
# ------------------------------------------------------
def
scop_lm_adhesion
(
self
):
def
scop_lm_adhesion
(
self
):
"""
"""
Display liste ministere form used for adhesion
:return: Form View LM
:return: Form View LM
"""
"""
self
.
ensure_one
()
self
.
ensure_one
()
...
@@ -222,7 +223,11 @@ class ScopPartner(models.Model):
...
@@ -222,7 +223,11 @@ class ScopPartner(models.Model):
@api.multi
@api.multi
def
scop_valid_cg
(
self
):
def
scop_valid_cg
(
self
):
"""
"""
Inherit function and create a LM inscription if doesn
'
t exist already
Inherit function to :
- create period adhesion CG
- create period adhesion Fédé if needed
- create invoice adhesion
- send email to coop with letter and invoice adhesion
"""
"""
res
=
super
(
ScopPartner
,
self
).
scop_valid_cg
()
res
=
super
(
ScopPartner
,
self
).
scop_valid_cg
()
...
@@ -230,7 +235,9 @@ class ScopPartner(models.Model):
...
@@ -230,7 +235,9 @@ class ScopPartner(models.Model):
self
.
create_period_adhesion_cg
(
num_adherent
)
self
.
create_period_adhesion_cg
(
num_adherent
)
self
.
create_period_adhesion_fede
(
num_adherent
)
self
.
create_period_adhesion_fede
(
num_adherent
)
# TODO : check pour fede CAE si coop is CAE ?
# TODO : check pour fede CAE si coop is CAE ?
# Génère facture adhésion
lm_adhesion
=
self
.
get_lm_adhesion
()
self
.
create_invoice_adhesion
(
lm_adhesion
)
# Génération du courrier d'adhésion
# Génération du courrier d'adhésion
# Envoi du courrier d'adhésion et de la facture à la coop
# Envoi du courrier d'adhésion et de la facture à la coop
...
@@ -238,11 +245,20 @@ class ScopPartner(models.Model):
...
@@ -238,11 +245,20 @@ class ScopPartner(models.Model):
@api.multi
@api.multi
def
create_num_adherent
(
self
):
def
create_num_adherent
(
self
):
"""
Generate new num adherent with sequence
:return:
"""
self
.
ensure_one
()
self
.
ensure_one
()
return
self
.
env
[
'
ir.sequence
'
].
next_by_code
(
'
scop.membership.period
'
)
return
self
.
env
[
'
ir.sequence
'
].
next_by_code
(
'
scop.membership.period
'
)
@api.multi
@api.multi
def
create_period_adhesion_cg
(
self
,
num_adherent
):
def
create_period_adhesion_cg
(
self
,
num_adherent
):
"""
Create new period adhesion for type CG
:param num_adherent:
:return:
"""
self
.
ensure_one
()
self
.
ensure_one
()
type_id
=
self
.
env
.
ref
(
'
cgscop_partner.membership_type_1
'
)
type_id
=
self
.
env
.
ref
(
'
cgscop_partner.membership_type_1
'
)
self
.
create_period_adhesion
(
type_id
,
num_adherent
)
self
.
create_period_adhesion
(
type_id
,
num_adherent
)
...
@@ -250,6 +266,11 @@ class ScopPartner(models.Model):
...
@@ -250,6 +266,11 @@ class ScopPartner(models.Model):
@api.multi
@api.multi
def
create_period_adhesion_fede
(
self
,
num_adherent
):
def
create_period_adhesion_fede
(
self
,
num_adherent
):
"""
Create new period adhesion for type fédération if naf is linked to fede
:param num_adherent:
:return:
"""
self
.
ensure_one
()
self
.
ensure_one
()
fede
=
self
.
naf_id
.
federation_id
fede
=
self
.
naf_id
.
federation_id
...
@@ -273,6 +294,12 @@ class ScopPartner(models.Model):
...
@@ -273,6 +294,12 @@ class ScopPartner(models.Model):
@api.multi
@api.multi
def
create_period_adhesion
(
self
,
type_id
,
number
):
def
create_period_adhesion
(
self
,
type_id
,
number
):
"""
Generic function to create period adhesion with type and number
:param type_id:
:param number:
:return:
"""
start
=
fields
.
Date
.
today
()
start
=
fields
.
Date
.
today
()
start_stat
=
fields
.
Date
.
today
()
start_stat
=
fields
.
Date
.
today
()
if
self
.
env
[
'
scop.membership.period
'
].
search
(
if
self
.
env
[
'
scop.membership.period
'
].
search
(
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter