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
d073eb2d
Valider
d073eb2d
rédigé
11 sept. 2019
par
Rémi - Le Filament
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Modif UR en company_id et ajout origin_company_type_id
parent
f8fd6aed
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
+14
-5
14 ajouts, 5 suppressions
models/res_partner.py
views/res_partner_cooperative.xml
+2
-1
2 ajouts, 1 suppression
views/res_partner_cooperative.xml
avec
16 ajouts
et
6 suppressions
models/res_partner.py
+
14
−
5
Voir le fichier @
d073eb2d
...
@@ -7,6 +7,9 @@ from odoo import models, fields
...
@@ -7,6 +7,9 @@ from odoo import models, fields
class
ScopPartner
(
models
.
Model
):
class
ScopPartner
(
models
.
Model
):
_inherit
=
"
res.partner
"
_inherit
=
"
res.partner
"
def
_default_company
(
self
):
return
self
.
env
[
'
res.company
'
].
_company_default_get
(
'
res.partner
'
)
# Infos générales
# Infos générales
is_cooperative
=
fields
.
Boolean
(
"
Est une coopérative
"
)
is_cooperative
=
fields
.
Boolean
(
"
Est une coopérative
"
)
...
@@ -14,12 +17,12 @@ class ScopPartner(models.Model):
...
@@ -14,12 +17,12 @@ class ScopPartner(models.Model):
# A garder ?
# A garder ?
unique_id_si_ur
=
fields
.
Char
(
"
Identifiant unique SI UR
"
)
unique_id_si_ur
=
fields
.
Char
(
"
Identifiant unique SI UR
"
)
unique_id_si_cg
=
fields
.
Char
(
"
Identifiant unique SI CG
"
)
unique_id_si_cg
=
fields
.
Char
(
"
Identifiant unique SI CG
"
)
company_id
=
fields
.
Many2one
(
ur
=
fields
.
Many2one
(
'
res.company
'
,
'
res.company
'
,
string
=
'
Union Régionale
'
,
string
=
'
Union Régionale
'
,
domain
=
[(
'
id
'
,
'
!=
'
,
1
)],
index
=
True
,
on_delete
=
'
restrict
'
)
on_delete
=
'
restrict
'
,
default
=
_default_company
)
siren
=
fields
.
Char
(
string
=
'
SIREN
'
,
size
=
9
)
siren
=
fields
.
Char
(
string
=
'
SIREN
'
,
size
=
9
)
registration_date
=
fields
.
Date
(
registration_date
=
fields
.
Date
(
string
=
"
Date d
'
immatriculation RCS
"
)
string
=
"
Date d
'
immatriculation RCS
"
)
...
@@ -44,6 +47,12 @@ class ScopPartner(models.Model):
...
@@ -44,6 +47,12 @@ class ScopPartner(models.Model):
(
'
transmission
'
,
'
Transmission
'
),
(
'
transmission
'
,
'
Transmission
'
),
(
'
takeover
'
,
'
reprise
'
)],
(
'
takeover
'
,
'
reprise
'
)],
string
=
'
Origine création en coop
'
)
string
=
'
Origine création en coop
'
)
origin_company_type_id
=
fields
.
Many2one
(
comodel_name
=
'
res.partner.company.type
'
,
string
=
"
Forme juridique d
'
origine
"
,
track_visibility
=
'
onchange
'
,
on_delete
=
'
restrict
'
)
project_status
=
fields
.
Selection
(
project_status
=
fields
.
Selection
(
[(
'
1_information
'
,
"
Phase d
'
information
"
),
[(
'
1_information
'
,
"
Phase d
'
information
"
),
(
'
2_pre-diagnostic
'
,
'
Phase de pré-diagnostic
'
),
(
'
2_pre-diagnostic
'
,
'
Phase de pré-diagnostic
'
),
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
views/res_partner_cooperative.xml
+
2
−
1
Voir le fichier @
d073eb2d
...
@@ -166,12 +166,13 @@
...
@@ -166,12 +166,13 @@
attrs=
"{'required':[('project_status','in',('4_adhesion', '5_suivi'))]}"
/>
attrs=
"{'required':[('project_status','in',('4_adhesion', '5_suivi'))]}"
/>
</group>
</group>
<group
string=
"UR"
>
<group
string=
"UR"
>
<field
name=
"
ur
"
required=
"True"
/>
<field
name=
"
company_id
"
required=
"True"
domain=
"[('id', '!=', 1)]"
/>
<field
name=
"creation_delegate_id"
widget=
"res_partner_many2one"
<field
name=
"creation_delegate_id"
widget=
"res_partner_many2one"
attrs=
"{'required':[('project_status','in',('2_pre-diagnostic','3_accompagnement','4_adhesion', '5_suivi'))]}"
/>
attrs=
"{'required':[('project_status','in',('2_pre-diagnostic','3_accompagnement','4_adhesion', '5_suivi'))]}"
/>
<field
name=
"followup_delegate_id"
widget=
"res_partner_many2one"
attrs=
"{'required':[('project_status','in',('5_suivi'))]}"
/>
<field
name=
"followup_delegate_id"
widget=
"res_partner_many2one"
attrs=
"{'required':[('project_status','in',('5_suivi'))]}"
/>
<field
name=
"revision_delegate_id"
widget=
"res_partner_many2one"
attrs=
"{'required':[('project_status','in',('5_suivi'))]}"
/>
<field
name=
"revision_delegate_id"
widget=
"res_partner_many2one"
attrs=
"{'required':[('project_status','in',('5_suivi'))]}"
/>
<field
name=
"creation_origin"
required=
"True"
/>
<field
name=
"creation_origin"
required=
"True"
/>
<field
name=
"origin_company_type_id"
required=
"True"
/>
<field
name=
"project_status"
required=
"True"
/>
<field
name=
"project_status"
required=
"True"
/>
<field
name=
"cooperative_form_id"
attrs=
"{'required':[('project_status','in',('2_pre-diagnostic','3_accompagnement','4_adhesion', '5_suivi'))]}"
/>
<field
name=
"cooperative_form_id"
attrs=
"{'required':[('project_status','in',('2_pre-diagnostic','3_accompagnement','4_adhesion', '5_suivi'))]}"
/>
<field
name=
"date_1st_sign"
attrs=
"{'required':[('project_status','in',('4_adhesion', '5_suivi'))]}"
/>
<field
name=
"date_1st_sign"
attrs=
"{'required':[('project_status','in',('4_adhesion', '5_suivi'))]}"
/>
...
...
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