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
Le Filament
Confédération Générale des SCOP
cgscop_partner
Validations
9477ca29
Valider
9477ca29
rédigé
8 oct. 2019
par
Rémi - Le Filament
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Ajout champs personnes
parent
3100674b
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
3
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
3 fichiers modifiés
models/res_partner.py
+22
-6
22 ajouts, 6 suppressions
models/res_partner.py
views/res_partner.xml
+21
-79
21 ajouts, 79 suppressions
views/res_partner.xml
views/res_partner_cooperative.xml
+9
-4
9 ajouts, 4 suppressions
views/res_partner_cooperative.xml
avec
52 ajouts
et
89 suppressions
models/res_partner.py
+
22
−
6
Voir le fichier @
9477ca29
...
...
@@ -68,7 +68,8 @@ class ScopPartner(models.Model):
twitter
=
fields
.
Char
(
"
Twitter
"
)
director_ids
=
fields
.
One2many
(
'
res.partner
'
,
'
parent_id
'
,
string
=
'
Contacts Dirigeants
'
)
string
=
'
Contacts Dirigeants
'
,
domain
=
[(
'
is_director
'
,
'
=
'
,
True
)])
# Infos générales / Suivi UR
ur_id
=
fields
.
Many2one
(
...
...
@@ -323,12 +324,26 @@ class ScopPartner(models.Model):
# Champs pour personnes
birthyear
=
fields
.
Integer
(
"
Année de naissance
"
)
education_level
=
fields
.
Selection
([
(
'
licence
'
,
'
Licence
'
),
(
'
master
'
,
'
Master
'
)],
(
13030
,
"
Aucun diplôme, CEP
"
),
(
13031
,
"
Brevet des collèges
"
),
(
13032
,
"
CAP, BEP
"
),
(
13033
,
"
Bac, brevet professionnel ou équivalent
"
),
(
13034
,
"
Supérieur court
"
),
(
13035
,
"
Supérieur long
"
),
(
13036
,
"
En cours d
'
études initiales
"
)],
"
Niveau d
'
étude
"
)
education_domain
=
fields
.
Selection
([
(
'
science
'
,
'
Science
'
)],
"
Domaine d
'
étude
"
)
csp
=
fields
.
Selection
([
(
14189
,
"
Cadres et professions intellectuelles
"
),
(
14201
,
"
Autres personnes sans activité
"
),
(
13022
,
"
Agriculteurs exploitants
"
),
(
13023
,
"
Artisans, commerçants et chefs d
'
entreprise
"
),
(
13024
,
"
Cadres et professions intellectuelles supérieures
"
),
(
13025
,
"
Professions Intermédiaires
"
),
(
13026
,
"
Employés
"
),
(
13027
,
"
Ouvriers
"
),
(
13028
,
"
Retraités
"
),
(
13029
,
"
Autres personnes sans activité professionnelle
"
)],
"
CSP
"
)
subscription_ids
=
fields
.
One2many
(
comodel_name
=
'
res.partner.newsletter.subscription
'
,
inverse_name
=
'
partner_id
'
,
...
...
@@ -345,6 +360,7 @@ class ScopPartner(models.Model):
(
"
legitimate
"
,
"
Intérêt légitime
"
),
(
"
none
"
,
"
Aucune
"
)],
string
=
"
Licéité du contact
"
,
default
=
"
none
"
)
is_director
=
fields
.
Boolean
(
"
Est un dirigeant
"
)
# Champs pour partenaires
organization_type_id
=
fields
.
Many2one
(
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
views/res_partner.xml
+
21
−
79
Voir le fichier @
9477ca29
...
...
@@ -131,95 +131,37 @@
<field
name=
"organization_type_id"
attrs=
"{'invisible': [('is_company','=', False)]}"
options=
"{'no_create': True}"
/>
<field
name=
"organization_subtype_id"
attrs=
"{'invisible': [('is_company','=', False)]}"
domain=
"[('parent_id', '=', organization_type_id), ('child_ids', '=', False)]"
options=
"{'no_create': True}"
/>
</group>
</xpath>
<xpath
expr=
'//form/sheet/group'
position=
"after"
>
<group
attrs=
"{'invisible': [('is_company','=', True)]}"
>
<group>
<field
name=
"title"
options=
'{"no_open": True}'
attrs=
"{'invisible': [('is_company','=', True)]}"
/>
<field
name=
"function"
/>
<field
name=
"is_director"
/>
<field
name=
"birthyear"
attrs=
"{'invisible': [('is_company','=', True)]}"
/>
<field
name=
"education_level"
attrs=
"{'invisible': [('is_company','=', True)]}"
options=
"{'no_create': True}"
/>
<field
name=
"
education_domain
"
attrs=
"{'invisible': [('is_company','=', True)]}"
options=
"{'no_create': True}"
/>
<field
name=
"
csp
"
attrs=
"{'invisible': [('is_company','=', True)]}"
options=
"{'no_create': True}"
/>
<field
name=
"contact_origin_id"
attrs=
"{'invisible': [('is_company','=', True)]}"
options=
"{'no_create': True}"
/>
<field
name=
"contact_legality"
readonly=
"True"
attrs=
"{'invisible': [('is_company','=', True)]}"
/>
<field
name=
"category_id"
string=
"Segmentation"
widget=
"many2many_tags"
options=
"{'color_field': 'color', 'no_create_edit': True}"
placeholder=
"Territoire Rattaché..."
can_create=
"true"
can_write=
"true"
modifiers=
"{}"
attrs=
"{'invisible': [('is_company','=', False)]}"
domain=
"[('ur_id', '=', ur_id)]"
/>
</group>
<group>
</xpath>
<xpath
expr=
'//form/sheet/group'
position=
"after"
>
<field
name=
"subscription_ids"
attrs=
"{'invisible': [('is_company','=', True)]}"
>
<tree
string=
"Subscriptions"
editable=
"bottom"
>
<field
name=
"newsletter_id"
domain=
"[]"
/>
<field
name=
"consent"
/>
</tree>
</field>
</group>
</group>
</xpath>
<field
name=
"vat"
position=
"replace"
>
<field
name=
"phone"
widget=
"phone"
modifiers=
"{}"
/>
<field
name=
"email"
widget=
"email"
on_change=
"1"
modifiers=
"{}"
/>
<field
name=
"ur_id"
options=
"{'no_create': True}"
on_change=
"1"
can_create=
"false"
can_write=
"false"
modifiers=
"{}"
/>
<field
name=
"phone"
widget=
"phone"
/>
<field
name=
"mobile"
widget=
"phone"
attrs=
"{'invisible': [('is_company','=', True)]}"
/>
<field
name=
"email"
widget=
"email"
on_change=
"1"
/>
<field
name=
"ur_id"
options=
"{'no_create': True}"
on_change=
"1"
can_create=
"false"
can_write=
"false"
/>
<field
name=
"website"
invisible=
"1"
/>
<field
name=
"lang"
invisible=
"1"
/>
</field>
</field>
</record>
<record
id=
"scop_contact_view_simple_form"
model=
"ir.ui.view"
>
<field
name=
"name"
>
add scop fields in simple form view
</field>
<field
name=
"model"
>
res.partner
</field>
<field
name=
"inherit_id"
ref=
"base.view_partner_simple_form"
/>
<field
name=
"arch"
type=
"xml"
>
<xpath
expr=
'//form/group'
position=
"after"
>
<group>
<group>
<field
name=
"title"
options=
'{"no_open": True, "no_create": True}'
attrs=
"{'invisible': [('is_company','=', True)]}"
/>
<field
name=
"birthyear"
attrs=
"{'invisible': [('is_company','=', True)]}"
/>
<field
name=
"education_level"
attrs=
"{'invisible': [('is_company','=', True)]}"
options=
"{'no_create': True}"
/>
<field
name=
"education_domain"
attrs=
"{'invisible': [('is_company','=', True)]}"
options=
"{'no_create': True}"
/>
<field
name=
"contact_origin_id"
attrs=
"{'invisible': [('is_company','=', True)]}"
options=
"{'no_create': True}"
/>
<field
name=
"contact_legality"
readonly=
"True"
attrs=
"{'invisible': [('is_company','=', True)]}"
/>
</group>
<group>
<field
name=
"subscription_ids"
attrs=
"{'invisible': [('is_company','=', True)]}"
>
<tree
string=
"Subscriptions"
editable=
"bottom"
>
<field
name=
"newsletter_id"
domain=
"[]"
/>
<field
name=
"consent"
/>
</tree>
</field>
</group>
</group>
</xpath>
</field>
</record>
<record
id=
"scop_contact_view_short_form"
model=
"ir.ui.view"
>
<field
name=
"name"
>
add scop fields in short form view
</field>
<field
name=
"model"
>
res.partner
</field>
<field
name=
"inherit_id"
ref=
"base.view_partner_short_form"
/>
<field
name=
"arch"
type=
"xml"
>
<xpath
expr=
'//form/sheet/group'
position=
"after"
>
<group>
<group>
<field
name=
"title"
options=
'{"no_open": True, "no_create": True}'
attrs=
"{'invisible': [('is_company','=', True)]}"
/>
<field
name=
"birthyear"
attrs=
"{'invisible': [('is_company','=', True)]}"
/>
<field
name=
"education_level"
attrs=
"{'invisible': [('is_company','=', True)]}"
options=
"{'no_create': True}"
/>
<field
name=
"education_domain"
attrs=
"{'invisible': [('is_company','=', True)]}"
options=
"{'no_create': True}"
/>
<field
name=
"contact_origin_id"
attrs=
"{'invisible': [('is_company','=', True)]}"
options=
"{'no_create': True}"
/>
<field
name=
"contact_legality"
readonly=
"True"
attrs=
"{'invisible': [('is_company','=', True)]}"
/>
</group>
<group>
<field
name=
"subscription_ids"
attrs=
"{'invisible': [('is_company','=', True)]}"
>
<tree
string=
"Subscriptions"
editable=
"bottom"
>
<field
name=
"newsletter_id"
domain=
"[]"
/>
<field
name=
"consent"
/>
</tree>
</field>
</group>
</group>
</xpath>
</field>
</record>
<record
id=
"action_not_companies_only"
model=
"ir.actions.act_window"
>
<field
name=
"name"
>
Personnes
</field>
<field
name=
"type"
>
ir.actions.act_window
</field>
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
views/res_partner_cooperative.xml
+
9
−
4
Voir le fichier @
9477ca29
...
...
@@ -172,7 +172,7 @@
<field
class=
"oe_edit_only"
name=
"twitter"
widget=
"url"
/>
</div>
<field
name=
"director_ids"
mode=
"kanban"
context=
"{'default_parent_id': active_id, 'default_street': street, 'default_street2': street2, 'default_city': city, 'default_cedex': cedex, 'default_state_id': state_id, 'default_zip': zip, 'default_zip_id': zip_id, 'default_country_id': country_id, 'default_supplier': supplier, 'default_customer': customer, 'default_lang': lang, 'default_user_id': user_id, 'default_type': 'contact'}"
>
context=
"{'default_parent_id': active_id, 'default_street': street, 'default_street2': street2, 'default_city': city, 'default_cedex': cedex, 'default_state_id': state_id, 'default_zip': zip, 'default_zip_id': zip_id, 'default_country_id': country_id, 'default_supplier': supplier, 'default_customer': customer, 'default_lang': lang, 'default_user_id': user_id, 'default_type': 'contact'
, 'default_is_director': True
}"
>
<kanban>
<field
name=
"id"
/>
<field
name=
"color"
/>
...
...
@@ -183,6 +183,7 @@
<field
name=
"parent_id"
/>
<field
name=
"is_company"
/>
<field
name=
"function"
/>
<field
name=
"is_director"
/>
<field
name=
"phone"
/>
<field
name=
"street"
/>
<field
name=
"street2"
/>
...
...
@@ -232,11 +233,13 @@
<field
name=
"country_id"
/>
</group>
<group>
<field
name=
"name"
string=
"Contact Name"
attrs=
"{'required' : [('type', '=', 'contact')]}"
/>
<field
name=
"lastname"
string=
"Contact Name"
attrs=
"{'required' : [('type', '=', 'contact')]}"
/>
<field
name=
"firstname"
string=
"Contact Name"
attrs=
"{'required' : [('type', '=', 'contact')]}"
/>
<field
name=
"title"
placeholder=
"Madame"
attrs=
"{'invisible': [('type','!=', 'contact')]}"
/>
<field
name=
"function"
placeholder=
"Responsable des ventes"
attrs=
"{'invisible': [('type','!=', 'contact')]}"
/>
<field
name=
"is_director"
attrs=
"{'invisible': [('type','!=', 'contact')]}"
/>
<field
name=
"email"
/>
<field
name=
"phone"
widget=
"phone"
/>
<field
name=
"mobile"
widget=
"phone"
/>
...
...
@@ -501,11 +504,13 @@
</div>
</group>
<group>
<field
name=
"name"
string=
"Contact Name"
attrs=
"{'required' : [('type', '=', 'contact')]}"
/>
<field
name=
"lastname"
string=
"Contact Name"
attrs=
"{'required' : [('type', '=', 'contact')]}"
/>
<field
name=
"firstname"
string=
"Contact Name"
attrs=
"{'required' : [('type', '=', 'contact')]}"
/>
<field
name=
"title"
placeholder=
"e.g. Mr."
attrs=
"{'invisible': [('type','!=', 'contact')]}"
/>
<field
name=
"function"
placeholder=
"e.g.
Sales Director
"
<field
name=
"function"
placeholder=
"e.g.
Directeur des Ventes
"
attrs=
"{'invisible': [('type','!=', 'contact')]}"
/>
<field
name=
"is_director"
attrs=
"{'invisible': [('type','!=', 'contact')]}"
/>
<field
name=
"email"
/>
<field
name=
"phone"
widget=
"phone"
/>
<field
name=
"mobile"
widget=
"phone"
/>
...
...
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