Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
C
cgscop_partner
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
Hervé Silvant - CGScop
cgscop_partner
Validations
a17ae59d
Valider
a17ae59d
rédigé
16 oct. 2019
par
Rémi - Le Filament
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Align with Excel spreadsheet
parent
6d38f3ae
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
2
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
2 fichiers modifiés
models/res_partner.py
+63
-47
63 ajouts, 47 suppressions
models/res_partner.py
models/scop_contribution.py
+1
-1
1 ajout, 1 suppression
models/scop_contribution.py
avec
64 ajouts
et
48 suppressions
models/res_partner.py
+
63
−
47
Voir le fichier @
a17ae59d
...
@@ -14,16 +14,15 @@ class ScopPartner(models.Model):
...
@@ -14,16 +14,15 @@ class ScopPartner(models.Model):
def
_default_country
(
self
):
def
_default_country
(
self
):
return
self
.
env
.
ref
(
'
base.fr
'
,
False
)
return
self
.
env
.
ref
(
'
base.fr
'
,
False
)
# Infos générales
# Infos générales
- champs non affichés
is_cooperative
=
fields
.
Boolean
(
"
Est une coopérative
"
)
is_cooperative
=
fields
.
Boolean
(
"
Est une coopérative
"
)
current_user_ur_id
=
fields
.
Many2one
(
current_user_ur_id
=
fields
.
Many2one
(
'
union.regionale
'
,
'
union.regionale
'
,
string
=
"
Union Régionale de l
'
utilisateur
"
,
string
=
"
Union Régionale de l
'
utilisateur
"
,
compute
=
'
_compute_current_user_ur_id
'
,
compute
=
'
_compute_current_user_ur_id
'
,
search
=
'
_search_current_user_ur_id
'
)
search
=
'
_search_current_user_ur_id
'
)
# Informations organisme
# Informations organisme
- champs non affichés
id_ur
=
fields
.
Char
(
"
Identifiant UR
"
)
id_ur
=
fields
.
Char
(
"
Identifiant UR
"
)
id_riga
=
fields
.
Char
(
"
Identifiant RIGA
"
)
id_riga
=
fields
.
Char
(
"
Identifiant RIGA
"
)
...
@@ -39,6 +38,7 @@ class ScopPartner(models.Model):
...
@@ -39,6 +38,7 @@ class ScopPartner(models.Model):
track_visibility
=
'
onchange
'
,
track_visibility
=
'
onchange
'
,
string
=
'
Statut projet
'
,
string
=
'
Statut projet
'
,
index
=
True
)
index
=
True
)
name
=
fields
.
Char
(
index
=
True
,
track_visibility
=
'
onchange
'
)
cooperative_form_id
=
fields
.
Many2one
(
cooperative_form_id
=
fields
.
Many2one
(
'
res.partner.cooperative.form
'
,
'
res.partner.cooperative.form
'
,
string
=
"
Cooperative form
"
,
string
=
"
Cooperative form
"
,
...
@@ -70,20 +70,22 @@ class ScopPartner(models.Model):
...
@@ -70,20 +70,22 @@ class ScopPartner(models.Model):
# Infos générales / Contact
# Infos générales / Contact
sigle
=
fields
.
Char
(
"
Sigle
"
)
sigle
=
fields
.
Char
(
"
Sigle
"
)
cedex
=
fields
.
Char
(
"
Cedex
"
)
street
=
fields
.
Char
(
"
Rue
"
,
track_visibility
=
'
onchange
'
)
street2
=
fields
.
Char
(
"
Rue 2
"
,
track_visibility
=
'
onchange
'
)
street3
=
fields
.
Char
(
"
Rue 3
"
,
track_visibility
=
'
onchange
'
)
zip
=
fields
.
Char
(
"
CP
"
,
change_default
=
True
,
track_visibility
=
'
onchange
'
)
city
=
fields
.
Char
(
"
Ville
"
,
track_visibility
=
'
onchange
'
)
cedex
=
fields
.
Char
(
"
Cedex
"
,
track_visibility
=
'
onchange
'
)
country_id
=
fields
.
Many2one
(
'
res.country
'
,
string
=
'
Country
'
,
country_id
=
fields
.
Many2one
(
'
res.country
'
,
string
=
'
Country
'
,
ondelete
=
'
restrict
'
,
ondelete
=
'
restrict
'
,
default
=
_default_country
)
default
=
_default_country
,
track_visibility
=
'
onchange
'
)
phone
=
fields
.
Char
(
"
Téléphone 1
"
,
track_visibility
=
'
onchange
'
)
mobile
=
fields
.
Char
(
"
Téléphone 2
"
,
track_visibility
=
'
onchange
'
)
email
=
fields
.
Char
(
"
eMail administratif
"
,
track_visibility
=
'
onchange
'
)
facebook
=
fields
.
Char
(
"
Facebook
"
)
facebook
=
fields
.
Char
(
"
Facebook
"
)
linkedin
=
fields
.
Char
(
"
LinkedIn
"
)
linkedin
=
fields
.
Char
(
"
LinkedIn
"
)
twitter
=
fields
.
Char
(
"
Twitter
"
)
twitter
=
fields
.
Char
(
"
Twitter
"
)
director_ids
=
fields
.
One2many
(
'
res.partner
'
,
'
parent_id
'
,
string
=
'
Contacts Dirigeants
'
,
domain
=
[(
'
active
'
,
'
=
'
,
True
),
(
'
mandate_id
'
,
'
!=
'
,
False
)])
other_child_ids
=
fields
.
One2many
(
'
res.partner
'
,
'
parent_id
'
,
string
=
'
Autres Contacts
'
,
domain
=
[(
'
active
'
,
'
=
'
,
True
),
(
'
mandate_id
'
,
'
=
'
,
False
)])
# Infos générales / Suivi UR
# Infos générales / Suivi UR
ur_id
=
fields
.
Many2one
(
ur_id
=
fields
.
Many2one
(
...
@@ -96,7 +98,7 @@ class ScopPartner(models.Model):
...
@@ -96,7 +98,7 @@ class ScopPartner(models.Model):
creation_delegate_id
=
fields
.
Many2one
(
creation_delegate_id
=
fields
.
Many2one
(
'
res.users
'
,
'
res.users
'
,
string
=
'
Délégué de création
'
,
string
=
'
Délégué de création
'
,
on_delete
=
'
restrict
'
)
on_delete
=
'
restrict
'
,
track_visibility
=
'
onchange
'
)
followup_delegate_id
=
fields
.
Many2one
(
followup_delegate_id
=
fields
.
Many2one
(
'
res.users
'
,
'
res.users
'
,
string
=
'
Délégué de suivi
'
,
string
=
'
Délégué de suivi
'
,
...
@@ -125,12 +127,12 @@ class ScopPartner(models.Model):
...
@@ -125,12 +127,12 @@ class ScopPartner(models.Model):
'
res.partner.creation.origin
'
,
'
res.partner.creation.origin
'
,
string
=
"
Origine création en coop
"
,
string
=
"
Origine création en coop
"
,
domain
=
[(
'
parent_id
'
,
'
=
'
,
False
)],
domain
=
[(
'
parent_id
'
,
'
=
'
,
False
)],
on_delete
=
'
restrict
'
)
on_delete
=
'
restrict
'
,
track_visibility
=
'
onchange
'
)
creation_suborigin_id
=
fields
.
Many2one
(
creation_suborigin_id
=
fields
.
Many2one
(
'
res.partner.creation.origin
'
,
'
res.partner.creation.origin
'
,
string
=
"
Sous-Origine création en coop
"
,
string
=
"
Sous-Origine création en coop
"
,
domain
=
[(
'
child_ids
'
,
'
=
'
,
False
)],
domain
=
[(
'
child_ids
'
,
'
=
'
,
False
)],
on_delete
=
'
restrict
'
)
on_delete
=
'
restrict
'
,
track_visibility
=
'
onchange
'
)
date_1st_sign
=
fields
.
Date
(
date_1st_sign
=
fields
.
Date
(
'
Date 1er signature coop
'
,
'
Date 1er signature coop
'
,
track_visibility
=
'
onchange
'
)
track_visibility
=
'
onchange
'
)
...
@@ -170,7 +172,7 @@ class ScopPartner(models.Model):
...
@@ -170,7 +172,7 @@ class ScopPartner(models.Model):
is_seed_scop
=
fields
.
Boolean
(
"
Est une SCOP d
'
amorçage
"
)
is_seed_scop
=
fields
.
Boolean
(
"
Est une SCOP d
'
amorçage
"
)
seed_end
=
fields
.
Date
(
"
Date de fin du dispositif d
'
amorçage
"
,
seed_end
=
fields
.
Date
(
"
Date de fin du dispositif d
'
amorçage
"
,
default
=
str
(
datetime
.
today
()
+
timedelta
(
2556
)),
default
=
str
(
datetime
.
today
()
+
timedelta
(
2556
)),
compute
=
'
_compute_see
n
_end
'
)
compute
=
'
_compute_see
d
_end
'
)
is_incubated
=
fields
.
Boolean
(
"
Est incubé
"
)
is_incubated
=
fields
.
Boolean
(
"
Est incubé
"
)
incubator_id
=
fields
.
Many2one
(
incubator_id
=
fields
.
Many2one
(
'
res.partner
'
,
'
res.partner
'
,
...
@@ -179,6 +181,15 @@ class ScopPartner(models.Model):
...
@@ -179,6 +181,15 @@ class ScopPartner(models.Model):
(
'
organization_subtype_id.name
'
,
'
=
'
,
'
Incubateur
'
)],
(
'
organization_subtype_id.name
'
,
'
=
'
,
'
Incubateur
'
)],
on_delete
=
'
restrict
'
)
on_delete
=
'
restrict
'
)
# Contacts
director_ids
=
fields
.
One2many
(
'
res.partner
'
,
'
parent_id
'
,
string
=
'
Contacts Dirigeants
'
,
domain
=
[(
'
active
'
,
'
=
'
,
True
),
(
'
mandate_id
'
,
'
!=
'
,
False
)])
other_child_ids
=
fields
.
One2many
(
'
res.partner
'
,
'
parent_id
'
,
string
=
'
Autres Contacts
'
,
domain
=
[(
'
active
'
,
'
=
'
,
True
),
(
'
mandate_id
'
,
'
=
'
,
False
)])
# Partenaires
# Partenaires
bank_id
=
fields
.
Many2one
(
bank_id
=
fields
.
Many2one
(
'
res.partner
'
,
'
res.partner
'
,
...
@@ -220,25 +231,8 @@ class ScopPartner(models.Model):
...
@@ -220,25 +231,8 @@ class ScopPartner(models.Model):
domain
=
[(
'
active
'
,
'
=
'
,
True
),
(
'
is_company
'
,
'
=
'
,
False
)],
domain
=
[(
'
active
'
,
'
=
'
,
True
),
(
'
is_company
'
,
'
=
'
,
False
)],
on_delete
=
'
restrict
'
)
on_delete
=
'
restrict
'
)
# Périodes juridiques
scop_period_ids
=
fields
.
One2many
(
comodel_name
=
'
scop.period
'
,
inverse_name
=
'
partner_id
'
,
string
=
"
Historique
"
)
# Période d'adhésion
membership_period_ids
=
fields
.
One2many
(
comodel_name
=
'
scop.membership.period
'
,
inverse_name
=
'
partner_id
'
,
string
=
"
Périodes d
'
adhésion
"
)
# Cotisation
contribution_ids
=
fields
.
One2many
(
comodel_name
=
'
scop.contribution
'
,
inverse_name
=
'
partner_id
'
,
string
=
'
Cotisations
'
)
# Liste Ministère
# Liste Ministère
# TODO : define what should be done with these fields ?
direccte_id
=
fields
.
Many2one
(
direccte_id
=
fields
.
Many2one
(
'
res.partner
'
,
'
res.partner
'
,
string
=
'
DIRECCTE rattachée
'
,
string
=
'
DIRECCTE rattachée
'
,
...
@@ -247,18 +241,6 @@ class ScopPartner(models.Model):
...
@@ -247,18 +241,6 @@ class ScopPartner(models.Model):
on_delete
=
'
restrict
'
)
on_delete
=
'
restrict
'
)
last_update_status
=
fields
.
Date
(
'
Dernière mise à jour des statuts
'
)
last_update_status
=
fields
.
Date
(
'
Dernière mise à jour des statuts
'
)
# Questionnaire
questionnaire_ids
=
fields
.
One2many
(
comodel_name
=
'
scop.questionnaire
'
,
inverse_name
=
'
partner_id
'
,
string
=
'
Listes Ministère
'
)
# Liasse fiscale
liasse_fiscale_ids
=
fields
.
One2many
(
comodel_name
=
'
scop.liasse.fiscale
'
,
inverse_name
=
'
partner_id
'
,
string
=
'
Liasses Fiscales
'
)
# Révisions
# Révisions
revision_contract
=
fields
.
Date
(
"
Date du contrat de révision
"
,
revision_contract
=
fields
.
Date
(
"
Date du contrat de révision
"
,
track_visibility
=
'
onchange
'
)
track_visibility
=
'
onchange
'
)
...
@@ -305,12 +287,46 @@ class ScopPartner(models.Model):
...
@@ -305,12 +287,46 @@ class ScopPartner(models.Model):
inverse_name
=
'
partner_id
'
,
inverse_name
=
'
partner_id
'
,
string
=
'
Liste des Révisions
'
)
string
=
'
Liste des Révisions
'
)
# Historique
scop_period_ids
=
fields
.
One2many
(
comodel_name
=
'
scop.period
'
,
inverse_name
=
'
partner_id
'
,
string
=
"
Historique
"
)
# Période d'adhésion
membership_period_ids
=
fields
.
One2many
(
comodel_name
=
'
scop.membership.period
'
,
inverse_name
=
'
partner_id
'
,
string
=
"
Périodes d
'
adhésion
"
)
# Cotisation
contribution_ids
=
fields
.
One2many
(
comodel_name
=
'
scop.contribution
'
,
inverse_name
=
'
partner_id
'
,
string
=
'
Cotisations
'
)
is_up_to_date_cg
=
fields
.
Boolean
(
"
A jour cotisation CG
"
)
is_up_to_date_fede
=
fields
.
Boolean
(
"
A jour cotisation Fédérations
"
)
is_up_to_date_ur
=
fields
.
Boolean
(
"
A jour cotisation UR
"
)
# Questionnaire
questionnaire_ids
=
fields
.
One2many
(
comodel_name
=
'
scop.questionnaire
'
,
inverse_name
=
'
partner_id
'
,
string
=
'
Listes Ministère
'
)
# Liasse fiscale
liasse_fiscale_ids
=
fields
.
One2many
(
comodel_name
=
'
scop.liasse.fiscale
'
,
inverse_name
=
'
partner_id
'
,
string
=
'
Liasses Fiscales
'
)
# Outils financiers
# Outils financiers
financial_tools_ids
=
fields
.
One2many
(
financial_tools_ids
=
fields
.
One2many
(
comodel_name
=
'
scop.financial.tools
'
,
comodel_name
=
'
scop.financial.tools
'
,
inverse_name
=
'
partner_id
'
,
inverse_name
=
'
partner_id
'
,
string
=
'
Outils financiers
'
)
string
=
'
Outils financiers
'
)
# Champs pour personnes
# Champs pour personnes
birthyear
=
fields
.
Integer
(
"
Année de naissance
"
)
birthyear
=
fields
.
Integer
(
"
Année de naissance
"
)
subscription_ids
=
fields
.
One2many
(
subscription_ids
=
fields
.
One2many
(
...
@@ -454,7 +470,7 @@ class ScopPartner(models.Model):
...
@@ -454,7 +470,7 @@ class ScopPartner(models.Model):
company
.
siren
=
company
.
siret
[:
9
]
company
.
siren
=
company
.
siret
[:
9
]
@api.model
@api.model
def
_compute_see
n
_end
(
self
):
def
_compute_see
d
_end
(
self
):
for
company
in
self
:
for
company
in
self
:
if
company
.
date_1st_sign
:
if
company
.
date_1st_sign
:
company
.
seed_end
=
company
.
date_1st_sign
+
timedelta
(
2556
)
company
.
seed_end
=
company
.
date_1st_sign
+
timedelta
(
2556
)
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
models/scop_contribution.py
+
1
−
1
Voir le fichier @
a17ae59d
...
@@ -26,7 +26,7 @@ class ScopContributions(models.Model):
...
@@ -26,7 +26,7 @@ class ScopContributions(models.Model):
amount_paid
=
fields
.
Float
(
"
Montant réglé
"
)
amount_paid
=
fields
.
Float
(
"
Montant réglé
"
)
amount_remaining_previous
=
fields
.
Float
(
"
Mnt Restant cum. à fin N-1
"
)
amount_remaining_previous
=
fields
.
Float
(
"
Mnt Restant cum. à fin N-1
"
)
amount_paid_late
=
fields
.
Float
(
"
Mnt réglé après clôture
"
)
amount_paid_late
=
fields
.
Float
(
"
Mnt réglé après clôture
"
)
spreading
=
fields
.
Selection
([(
1
,
1
),
(
4
,
4
)],
string
=
"
Echelonnement
"
)
spreading
=
fields
.
Integer
(
"
Echelonnement
"
)
amount_remaining
=
fields
.
Float
(
"
Montant Restant
"
)
amount_remaining
=
fields
.
Float
(
"
Montant Restant
"
)
quarter_1
=
fields
.
Date
(
"
1er Trim.
"
)
quarter_1
=
fields
.
Date
(
"
1er Trim.
"
)
quarter_2
=
fields
.
Date
(
"
2ème Trim.
"
)
quarter_2
=
fields
.
Date
(
"
2ème Trim.
"
)
...
...
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