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
079f118a
Valider
079f118a
rédigé
21 avr. 2020
par
Benjamin - Le Filament
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
[fix] modification vue et modèle pour la gestion des enfants d'une coop (pbl droits enfants)
parent
3fdb5bef
Branches
Branches contenant la validation
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
+62
-0
62 ajouts, 0 suppression
models/res_partner.py
views/res_partner.xml
+153
-129
153 ajouts, 129 suppressions
views/res_partner.xml
avec
215 ajouts
et
129 suppressions
models/res_partner.py
+
62
−
0
Voir le fichier @
079f118a
...
@@ -374,6 +374,8 @@ class ScopPartner(models.Model):
...
@@ -374,6 +374,8 @@ class ScopPartner(models.Model):
domain
=
[(
'
child_ids
'
,
'
=
'
,
False
)],
domain
=
[(
'
child_ids
'
,
'
=
'
,
False
)],
on_delete
=
'
restrict
'
,
on_delete
=
'
restrict
'
,
track_visibility
=
'
onchange
'
)
track_visibility
=
'
onchange
'
)
# Hack pour la création de contacts depuis la fiche organisme
parent_id_onchange
=
fields
.
Many2one
(
'
res.partner
'
)
# ------------------------------------------------------
# ------------------------------------------------------
# Constrains
# Constrains
...
@@ -431,6 +433,12 @@ class ScopPartner(models.Model):
...
@@ -431,6 +433,12 @@ class ScopPartner(models.Model):
# ------------------------------------------------------
# ------------------------------------------------------
# Onchange
# Onchange
# ------------------------------------------------------
# ------------------------------------------------------
# Hack pour la création de contacts depuis la fiche organisme
@api.onchange
(
'
parent_id_onchange
'
)
def
_onchange_parent_id_onchange
(
self
):
self
.
parent_id
=
self
.
parent_id_onchange
@api.onchange
(
'
creation_origin_id
'
)
@api.onchange
(
'
creation_origin_id
'
)
def
onchange_creation_origin_id
(
self
):
def
onchange_creation_origin_id
(
self
):
for
coop
in
self
:
for
coop
in
self
:
...
@@ -538,6 +546,7 @@ class ScopPartner(models.Model):
...
@@ -538,6 +546,7 @@ class ScopPartner(models.Model):
vals
[
'
firstname
'
]
=
vals
.
get
(
'
firstname
'
).
title
()
vals
[
'
firstname
'
]
=
vals
.
get
(
'
firstname
'
).
title
()
if
vals
.
get
(
'
city
'
):
if
vals
.
get
(
'
city
'
):
vals
[
'
city
'
]
=
vals
.
get
(
'
city
'
).
upper
()
vals
[
'
city
'
]
=
vals
.
get
(
'
city
'
).
upper
()
result
=
super
(
ScopPartner
,
self
).
write
(
vals
)
result
=
super
(
ScopPartner
,
self
).
write
(
vals
)
for
partner
in
self
:
for
partner
in
self
:
if
(
not
partner
.
is_company
if
(
not
partner
.
is_company
...
@@ -770,6 +779,59 @@ class ScopPartner(models.Model):
...
@@ -770,6 +779,59 @@ class ScopPartner(models.Model):
})
})
return
True
return
True
def
add_director
(
self
):
return
{
'
type
'
:
'
ir.actions.act_window
'
,
'
views
'
:
[[
self
.
env
.
ref
(
'
cgscop_partner.scop_partner_director_form_view
'
).
id
,
"
form
"
]],
'
view_mode
'
:
'
form
'
,
'
res_model
'
:
'
res.partner
'
,
'
target
'
:
'
new
'
,
'
context
'
:
{
'
default_parent_id_onchange
'
:
self
.
id
,
'
default_street
'
:
self
.
street
,
'
default_street2
'
:
self
.
street2
,
'
default_street3
'
:
self
.
street3
,
'
default_city
'
:
self
.
city
,
'
default_city_id
'
:
self
.
city_id
.
id
,
'
default_cedex
'
:
self
.
cedex
,
'
default_state_id
'
:
self
.
state_id
.
id
,
'
default_zip
'
:
self
.
zip
,
'
default_country_id
'
:
self
.
country_id
.
id
,
'
default_supplier
'
:
self
.
supplier
,
'
default_customer
'
:
self
.
customer
,
'
default_lang
'
:
self
.
lang
,
'
default_user_id
'
:
self
.
user_id
.
id
,
'
default_ur_id
'
:
self
.
ur_id
.
id
,
'
default_type
'
:
'
contact
'
,
},
}
def
add_contact
(
self
):
return
{
'
type
'
:
'
ir.actions.act_window
'
,
'
views
'
:
[[
self
.
env
.
ref
(
'
cgscop_partner.scop_partner_contact_form_view
'
).
id
,
"
form
"
]],
'
view_mode
'
:
'
form
'
,
'
res_model
'
:
'
res.partner
'
,
'
target
'
:
'
new
'
,
'
context
'
:
{
'
default_parent_id_onchange
'
:
self
.
id
,
'
default_street
'
:
self
.
street
,
'
default_street2
'
:
self
.
street2
,
'
default_street3
'
:
self
.
street3
,
'
default_city
'
:
self
.
city
,
'
default_city_id
'
:
self
.
city_id
.
id
,
'
default_cedex
'
:
self
.
cedex
,
'
default_state_id
'
:
self
.
state_id
.
id
,
'
default_zip
'
:
self
.
zip
,
'
default_country_id
'
:
self
.
country_id
.
id
,
'
default_supplier
'
:
self
.
supplier
,
'
default_customer
'
:
self
.
customer
,
'
default_lang
'
:
self
.
lang
,
'
default_user_id
'
:
self
.
user_id
.
id
,
'
default_ur_id
'
:
self
.
ur_id
.
id
},
}
class
ResPartneCertification
(
models
.
Model
):
class
ResPartneCertification
(
models
.
Model
):
_name
=
"
res.partner.certification
"
_name
=
"
res.partner.certification
"
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
views/res_partner.xml
+
153
−
129
Voir le fichier @
079f118a
...
@@ -83,6 +83,7 @@
...
@@ -83,6 +83,7 @@
<!-- Affiche les champs de la vue partenaire -->
<!-- Affiche les champs de la vue partenaire -->
<field
name=
"parent_id"
position=
"before"
>
<field
name=
"parent_id"
position=
"before"
>
<field
name=
"parent_id_onchange"
invisible=
"1"
/>
<label
for=
"parent_id"
string=
"Société"
attrs=
"{'invisible': ['|', '&', ('is_company','=', True),('parent_id', '=', False),('company_name', '!=', False),('company_name', '!=', '')]}"
/>
<label
for=
"parent_id"
string=
"Société"
attrs=
"{'invisible': ['|', '&', ('is_company','=', True),('parent_id', '=', False),('company_name', '!=', False),('company_name', '!=', '')]}"
/>
</field>
</field>
<field
name=
"parent_id"
position=
"attributes"
>
<field
name=
"parent_id"
position=
"attributes"
>
...
@@ -364,7 +365,7 @@
...
@@ -364,7 +365,7 @@
<field
name=
"creation_origin_id"
attrs=
"{'required': [('is_cooperative', '=', True)]}"
options=
"{'no_open': True, 'no_create': True}"
/>
<field
name=
"creation_origin_id"
attrs=
"{'required': [('is_cooperative', '=', True)]}"
options=
"{'no_open': True, 'no_create': True}"
/>
<field
name=
"creation_suborigin_id"
domain=
"[('parent_id', '=', creation_origin_id), ('child_ids', '=', False)]"
options=
"{'no_open': True, 'no_create': True}"
/>
<field
name=
"creation_suborigin_id"
domain=
"[('parent_id', '=', creation_origin_id), ('child_ids', '=', False)]"
options=
"{'no_open': True, 'no_create': True}"
/>
<field
name=
"is_ag_constitution"
attrs=
"{'invisible': [('project_status', '!=', '3_accompagnement')]}"
/>
<field
name=
"is_ag_constitution"
attrs=
"{'invisible': [('project_status', '!=', '3_accompagnement')]}"
/>
<field
name=
"date_1st_sign"
attrs=
"{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement')), ('is_ag_constitution', '!=', True)], 'required': ['|', ('project_status', 'in', ('4_adhesion', '5_cg', '6_suivi')), ('is_ag_constitution', '=', True)]}"
/>
<field
name=
"date_1st_sign"
attrs=
"{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement')), ('is_ag_constitution', '!=', True)], 'required': ['|', ('project_status', 'in', ('4_adhesion', '5_cg', '6_suivi')), ('is_ag_constitution', '=',
True), ('is_cooperative', '=',
True)]}"
/>
<field
name=
"registration_date"
attrs=
"{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}"
/>
<field
name=
"registration_date"
attrs=
"{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}"
/>
<field
name=
"social_object"
attrs=
"{'required': [('is_cooperative', '=', True), ('project_status','in',('2_pre-diagnostic', '3_accompagnement','4_adhesion', '5_cg', '6_suivi'))]}"
/>
<field
name=
"social_object"
attrs=
"{'required': [('is_cooperative', '=', True), ('project_status','in',('2_pre-diagnostic', '3_accompagnement','4_adhesion', '5_cg', '6_suivi'))]}"
/>
<field
name=
"naf_id"
attrs=
"{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')], 'required':['|', ('project_status','in',('4_adhesion', '5_cg'), '&', ('write_date', '=', False), ('project_status', '=', '6_suivi'))], 'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}"
options=
"{'no_open': True, 'no_create': True}"
/>
<field
name=
"naf_id"
attrs=
"{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')], 'required':['|', ('project_status','in',('4_adhesion', '5_cg'), '&', ('write_date', '=', False), ('project_status', '=', '6_suivi'))], 'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}"
options=
"{'no_open': True, 'no_create': True}"
/>
...
@@ -392,8 +393,10 @@
...
@@ -392,8 +393,10 @@
<notebook
colspan=
"4"
>
<notebook
colspan=
"4"
>
<page
name=
"scop_contacts"
string=
"Contacts & Addresses"
>
<page
name=
"scop_contacts"
string=
"Contacts & Addresses"
>
<label
for=
"director_ids"
string=
"Dirigeants"
/>
<label
for=
"director_ids"
string=
"Dirigeants"
/>
<field
name=
"director_ids"
<p>
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_city_id': city_id, 'default_country_id': country_id, 'default_supplier': supplier, 'default_customer': customer, 'default_lang': lang, 'default_user_id': user_id, 'default_ur_id': ur_id, 'default_type': 'contact', }"
>
<button
name=
"add_director"
type=
"object"
class=
"btn-info"
string=
"Ajouter un dirigeant"
></button>
</p>
<field
name=
"director_ids"
readonly=
"1"
>
<kanban>
<kanban>
<field
name=
"id"
/>
<field
name=
"id"
/>
<field
name=
"color"
/>
<field
name=
"color"
/>
...
@@ -449,63 +452,12 @@
...
@@ -449,63 +452,12 @@
</t>
</t>
</templates>
</templates>
</kanban>
</kanban>
<form
string=
"Contact Dirigeant"
>
<sheet>
<field
name=
"parent_id"
invisible=
"1"
/>
<group
col=
"2"
>
<group
invisible=
"1"
>
<field
name=
"street"
/>
<field
name=
"street2"
/>
<field
name=
"street3"
/>
<field
name=
"zip_id"
/>
<field
name=
"zip"
/>
<field
name=
"city"
/>
<field
name=
"cedex"
/>
<field
name=
"state_id"
/>
<field
name=
"country_id"
/>
<field
name=
"type"
/>
<field
name=
"category_id"
/>
</group>
<group>
<field
name=
"title"
placeholder=
"Madame"
options=
'{"no_open": True, "no_create": True}'
/>
<field
name=
"firstname"
string=
"Prénom"
required=
"1"
/>
<field
name=
"lastname"
string=
"Nom de famille"
required=
"1"
/>
<field
name=
"mandate_id"
options=
"{'no_open': True, 'no_create': True}"
required=
"1"
/>
<field
name=
"function"
placeholder=
"Responsable des ventes"
/>
<field
name=
"email"
/>
<field
name=
"phone"
widget=
"phone"
/>
<field
name=
"mobile"
widget=
"phone"
/>
<field
name=
"category_id"
widget=
"many2many_tags"
options=
"{'color_field': 'color', 'no_create': True}"
/>
<field
name=
"comment"
placeholder=
"Commentaires..."
/>
</group>
<group>
<field
name=
"birthyear"
/>
<field
name=
"contact_origin_id"
options=
"{'no_open': True, 'no_create': True}"
/>
<field
name=
"contact_legality"
readonly=
"1"
/>
<field
name=
"segment_1_id"
widget=
"many2many_tags"
options=
"{'color_field': 'color', 'no_create': True}"
domain=
"[('ur_id', '=', ur_id)]"
/>
<field
name=
"segment_2_id"
widget=
"many2many_tags"
options=
"{'color_field': 'color', 'no_create': True}"
domain=
"[('ur_id', '=', ur_id)]"
/>
<field
name=
"segment_3_id"
widget=
"many2many_tags"
options=
"{'color_field': 'color', 'no_create': True}"
domain=
"[('ur_id', '=', ur_id)]"
/>
<field
name=
"segment_4_id"
widget=
"many2many_tags"
options=
"{'color_field': 'color', 'no_create': True}"
domain=
"[('ur_id', '=', ur_id)]"
/>
</group>
</group>
<field
name=
"subscription_ids"
>
<tree
string=
"Subscriptions"
editable=
"bottom"
>
<field
name=
"newsletter_id"
/>
<field
name=
"consent"
/>
</tree>
</field>
<field
name=
"supplier"
invisible=
"True"
/>
<field
name=
"customer"
invisible=
"True"
/>
<field
name=
"lang"
invisible=
"True"
/>
<field
name=
"image"
invisible=
"True"
/>
<field
name=
"user_id"
invisible=
"True"
/>
<field
name=
"ur_id"
invisible=
"True"
/>
</sheet>
</form>
</field>
</field>
<label
for=
"other_child_ids"
string=
"Autres Contacts / Adresses"
/>
<label
for=
"other_child_ids"
string=
"Autres Contacts / Adresses"
/>
<field
name=
"other_child_ids"
mode=
"kanban"
<p>
context=
"{'default_parent_id': active_id, 'default_street': street, 'default_street2': street2, 'default_street3': street3, 'default_city': city, 'default_city_id': city_id, 'default_cedex': cedex, 'default_state_id': state_id, 'default_zip': zip, 'default_country_id': country_id, 'default_supplier': supplier, 'default_customer': customer, 'default_lang': lang, 'default_user_id': user_id, 'default_ur_id': ur_id}"
>
<button
name=
"add_contact"
type=
"object"
class=
"btn-info"
string=
"Ajouter un contact"
></button>
</p>
<field
name=
"other_child_ids"
mode=
"kanban"
readonly=
"1"
>
<kanban>
<kanban>
<field
name=
"id"
/>
<field
name=
"id"
/>
<field
name=
"color"
/>
<field
name=
"color"
/>
...
@@ -574,77 +526,6 @@
...
@@ -574,77 +526,6 @@
</t>
</t>
</templates>
</templates>
</kanban>
</kanban>
<form
string=
"Contact / Address"
>
<sheet>
<!-- parent_id and type fields needed in attrs in base_address_city module which overwrites
_fields_view_get() of partner. It would be better to put those fields there but the web client
dosen't support when a field is displayed several times in the same view.-->
<field
name=
"type"
required=
"1"
widget=
"radio"
options=
"{'horizontal': true}"
/>
<field
name=
"parent_id"
invisible=
"1"
/>
<hr/>
<group>
<group
attrs=
"{'invisible': [('type', '=', 'contact')]}"
>
<label
for=
"street"
string=
"Address"
/>
<div>
<div
name=
"div_address"
class=
"o_address_format"
>
<field
name=
"street"
placeholder=
"Rue..."
class=
"o_address_street"
/>
<field
name=
"street2"
placeholder=
"Rue 2..."
class=
"o_address_street"
/>
<field
name=
"street3"
placeholder=
"Rue 3..."
class=
"o_address_street"
/>
<field
name=
"zip_id"
options=
"{'create_name_field': 'city', 'no_open': True, 'no_create': True}"
placeholder=
"CP/Ville autocomplétion"
class=
"oe_edit_only"
/>
<field
name=
"zip"
placeholder=
"ZIP"
class=
"o_address_city"
/>
<field
name=
"city"
placeholder=
"Ville"
class=
"o_address_city"
attrs=
"{'readonly': [('type', '=', 'contact'), ('parent_id', '!=', False)]}"
modifiers=
"{'readonly':[['type','=','contact'],['parent_id','!=',false]]}"
/>
<field
name=
"city_id"
invisible=
"1"
/>
<field
name=
"cedex"
placeholder=
"Cedex"
class=
"o_address_city"
attrs=
"{'readonly': [('type', '=', 'contact'), ('parent_id', '!=', False)]}"
modifiers=
"{'readonly':[['type','=','contact'],['parent_id','!=',false]]}"
/>
<field
name=
"state_id"
class=
"o_address_zip"
placeholder=
"Région"
options=
'{"no_open": True, "no_create": True}'
context=
"{'country_id': country_id, 'zip': zip}"
/>
<field
name=
"country_id"
placeholder=
"Country"
class=
"o_address_country"
options=
'{"no_open": True, "no_create": True}'
/>
</div>
</div>
</group>
<group>
<field
name=
"title"
placeholder=
"Madame"
attrs=
"{'invisible': [('type','!=', 'contact')]}"
options=
'{"no_open": True, "no_create": True}'
/>
<field
name=
"name"
string=
"Nom"
attrs=
"{'required' : [('type', '!=', 'contact')], 'invisible' : [('type', '=', 'contact')]}"
/>
<field
name=
"firstname"
string=
"Prénom"
attrs=
"{'required' : [('type', '=', 'contact')], 'invisible' : [('type', '!=', 'contact')]}"
/>
<field
name=
"lastname"
string=
"Nom de famille"
attrs=
"{'required' : [('type', '=', 'contact')], 'invisible' : [('type', '!=', 'contact')]}"
/>
<field
name=
"mandate_id"
options=
"{'no_open': True, 'no_create': True}"
attrs=
"{'invisible': [('type','!=', 'contact')]}"
/>
<field
name=
"function"
placeholder=
"e.g. Directeur des Ventes"
attrs=
"{'invisible': [('type','!=', 'contact')]}"
/>
<field
name=
"email"
/>
<field
name=
"phone"
widget=
"phone"
/>
<field
name=
"mobile"
widget=
"phone"
/>
<field
name=
"category_id"
widget=
"many2many_tags"
options=
"{'color_field': 'color', 'no_create': True}"
/>
<field
name=
"comment"
placeholder=
"internal note..."
/>
</group>
<group
attrs=
"{'invisible': [('type', '!=', 'contact')]}"
>
<field
name=
"birthyear"
/>
<field
name=
"contact_origin_id"
options=
"{'no_open': True, 'no_create': True}"
/>
<field
name=
"contact_legality"
readonly=
"1"
/>
<field
name=
"segment_1_id"
widget=
"many2many_tags"
options=
"{'color_field': 'color', 'no_create': True}"
domain=
"[('ur_id', '=', ur_id)]"
/>
<field
name=
"segment_2_id"
widget=
"many2many_tags"
options=
"{'color_field': 'color', 'no_create': True}"
domain=
"[('ur_id', '=', ur_id)]"
/>
<field
name=
"segment_3_id"
widget=
"many2many_tags"
options=
"{'color_field': 'color', 'no_create': True}"
domain=
"[('ur_id', '=', ur_id)]"
/>
<field
name=
"segment_4_id"
widget=
"many2many_tags"
options=
"{'color_field': 'color', 'no_create': True}"
domain=
"[('ur_id', '=', ur_id)]"
/>
</group>
</group>
<field
name=
"subscription_ids"
attrs=
"{'invisible': [('type', '!=', 'contact')]}"
>
<tree
string=
"Subscriptions"
editable=
"bottom"
>
<field
name=
"newsletter_id"
domain=
"[]"
/>
<field
name=
"consent"
/>
</tree>
</field>
<field
name=
"supplier"
invisible=
"True"
/>
<field
name=
"customer"
invisible=
"True"
/>
<field
name=
"lang"
invisible=
"True"
/>
<field
name=
"image"
invisible=
"True"
/>
<field
name=
"user_id"
invisible=
"True"
/>
<field
name=
"ur_id"
invisible=
"True"
options=
'{"no_open": True, "no_create": True}'
/>
</sheet>
</form>
</field>
</field>
</page>
</page>
<page
name=
'scop_revision'
string=
"Révisions"
attrs=
"{'invisible': [('project_status', '!=', '6_suivi')]}"
>
<page
name=
'scop_revision'
string=
"Révisions"
attrs=
"{'invisible': [('project_status', '!=', '6_suivi')]}"
>
...
@@ -860,6 +741,149 @@
...
@@ -860,6 +741,149 @@
</field>
</field>
</record>
</record>
<!--
CG Scop Partner Director View
-->
<record
id=
"scop_partner_director_form_view"
model=
"ir.ui.view"
>
<field
name=
"name"
>
scop.partner.director.form.view
</field>
<field
name=
"model"
>
res.partner
</field>
<field
name=
"arch"
type=
"xml"
>
<form
string=
"Contact Dirigeant"
>
<sheet>
<field
name=
"parent_id_onchange"
invisible=
"1"
/>
<field
name=
"parent_id"
invisible=
"1"
/>
<group
col=
"2"
>
<group
invisible=
"1"
>
<field
name=
"street"
/>
<field
name=
"street2"
/>
<field
name=
"street3"
/>
<field
name=
"zip_id"
/>
<field
name=
"zip"
/>
<field
name=
"city"
/>
<field
name=
"cedex"
/>
<field
name=
"state_id"
/>
<field
name=
"country_id"
/>
<field
name=
"type"
/>
<field
name=
"category_id"
/>
</group>
<group>
<field
name=
"title"
placeholder=
"Madame"
options=
'{"no_open": True, "no_create": True}'
/>
<field
name=
"firstname"
string=
"Prénom"
required=
"1"
/>
<field
name=
"lastname"
string=
"Nom de famille"
required=
"1"
/>
<field
name=
"mandate_id"
options=
"{'no_open': True, 'no_create': True}"
required=
"1"
/>
<field
name=
"function"
placeholder=
"Responsable des ventes"
/>
<field
name=
"email"
/>
<field
name=
"phone"
widget=
"phone"
/>
<field
name=
"mobile"
widget=
"phone"
/>
<field
name=
"category_id"
widget=
"many2many_tags"
options=
"{'color_field': 'color', 'no_create': True}"
/>
<field
name=
"comment"
placeholder=
"Commentaires..."
/>
</group>
<group>
<field
name=
"birthyear"
/>
<field
name=
"contact_origin_id"
options=
"{'no_open': True, 'no_create': True}"
/>
<field
name=
"contact_legality"
readonly=
"1"
/>
<field
name=
"segment_1_id"
widget=
"many2many_tags"
options=
"{'color_field': 'color', 'no_create': True}"
domain=
"[('ur_id', '=', ur_id)]"
/>
<field
name=
"segment_2_id"
widget=
"many2many_tags"
options=
"{'color_field': 'color', 'no_create': True}"
domain=
"[('ur_id', '=', ur_id)]"
/>
<field
name=
"segment_3_id"
widget=
"many2many_tags"
options=
"{'color_field': 'color', 'no_create': True}"
domain=
"[('ur_id', '=', ur_id)]"
/>
<field
name=
"segment_4_id"
widget=
"many2many_tags"
options=
"{'color_field': 'color', 'no_create': True}"
domain=
"[('ur_id', '=', ur_id)]"
/>
</group>
</group>
<field
name=
"subscription_ids"
>
<tree
string=
"Subscriptions"
editable=
"bottom"
>
<field
name=
"newsletter_id"
/>
<field
name=
"consent"
/>
</tree>
</field>
<field
name=
"supplier"
invisible=
"True"
/>
<field
name=
"customer"
invisible=
"True"
/>
<field
name=
"lang"
invisible=
"True"
/>
<field
name=
"image"
invisible=
"True"
/>
<field
name=
"user_id"
invisible=
"True"
/>
<field
name=
"ur_id"
invisible=
"True"
/>
</sheet>
</form>
</field>
</record>
<!--
CG Scop Partner Contact View
-->
<record
id=
"scop_partner_contact_form_view"
model=
"ir.ui.view"
>
<field
name=
"name"
>
scop.partner.contact.form.view
</field>
<field
name=
"model"
>
res.partner
</field>
<field
name=
"arch"
type=
"xml"
>
<form
string=
"Contact / Address"
>
<sheet>
<field
name=
"type"
required=
"1"
widget=
"radio"
options=
"{'horizontal': true}"
/>
<field
name=
"parent_id_onchange"
invisible=
"1"
/>
<field
name=
"parent_id"
invisible=
"1"
/>
<hr/>
<group>
<group
attrs=
"{'invisible': [('type', '=', 'contact')]}"
>
<label
for=
"street"
string=
"Address"
/>
<div>
<div
name=
"div_address"
class=
"o_address_format"
>
<field
name=
"street"
placeholder=
"Rue..."
class=
"o_address_street"
/>
<field
name=
"street2"
placeholder=
"Rue 2..."
class=
"o_address_street"
/>
<field
name=
"street3"
placeholder=
"Rue 3..."
class=
"o_address_street"
/>
<field
name=
"zip_id"
options=
"{'create_name_field': 'city', 'no_open': True, 'no_create': True}"
placeholder=
"CP/Ville autocomplétion"
class=
"oe_edit_only"
/>
<field
name=
"zip"
placeholder=
"ZIP"
class=
"o_address_city"
/>
<field
name=
"city"
placeholder=
"Ville"
class=
"o_address_city"
attrs=
"{'readonly': [('type', '=', 'contact'), ('parent_id', '!=', False)]}"
modifiers=
"{'readonly':[['type','=','contact'],['parent_id','!=',false]]}"
/>
<field
name=
"city_id"
invisible=
"1"
/>
<field
name=
"cedex"
placeholder=
"Cedex"
class=
"o_address_city"
attrs=
"{'readonly': [('type', '=', 'contact'), ('parent_id', '!=', False)]}"
modifiers=
"{'readonly':[['type','=','contact'],['parent_id','!=',false]]}"
/>
<field
name=
"state_id"
class=
"o_address_zip"
placeholder=
"Région"
options=
'{"no_open": True, "no_create": True}'
context=
"{'country_id': country_id, 'zip': zip}"
/>
<field
name=
"country_id"
placeholder=
"Country"
class=
"o_address_country"
options=
'{"no_open": True, "no_create": True}'
/>
</div>
</div>
</group>
<group>
<field
name=
"title"
placeholder=
"Madame"
attrs=
"{'invisible': [('type','!=', 'contact')]}"
options=
'{"no_open": True, "no_create": True}'
/>
<field
name=
"name"
string=
"Nom"
attrs=
"{'required' : [('type', '!=', 'contact')], 'invisible' : [('type', '=', 'contact')]}"
/>
<field
name=
"firstname"
string=
"Prénom"
attrs=
"{'required' : [('type', '=', 'contact')], 'invisible' : [('type', '!=', 'contact')]}"
/>
<field
name=
"lastname"
string=
"Nom de famille"
attrs=
"{'required' : [('type', '=', 'contact')], 'invisible' : [('type', '!=', 'contact')]}"
/>
<field
name=
"mandate_id"
options=
"{'no_open': True, 'no_create': True}"
attrs=
"{'invisible': [('type','!=', 'contact')]}"
/>
<field
name=
"function"
placeholder=
"e.g. Directeur des Ventes"
attrs=
"{'invisible': [('type','!=', 'contact')]}"
/>
<field
name=
"email"
/>
<field
name=
"phone"
widget=
"phone"
/>
<field
name=
"mobile"
widget=
"phone"
/>
<field
name=
"category_id"
widget=
"many2many_tags"
options=
"{'color_field': 'color', 'no_create': True}"
/>
<field
name=
"comment"
placeholder=
"internal note..."
/>
</group>
<group
attrs=
"{'invisible': [('type', '!=', 'contact')]}"
>
<field
name=
"birthyear"
/>
<field
name=
"contact_origin_id"
options=
"{'no_open': True, 'no_create': True}"
/>
<field
name=
"contact_legality"
readonly=
"1"
/>
<field
name=
"segment_1_id"
widget=
"many2many_tags"
options=
"{'color_field': 'color', 'no_create': True}"
domain=
"[('ur_id', '=', ur_id)]"
/>
<field
name=
"segment_2_id"
widget=
"many2many_tags"
options=
"{'color_field': 'color', 'no_create': True}"
domain=
"[('ur_id', '=', ur_id)]"
/>
<field
name=
"segment_3_id"
widget=
"many2many_tags"
options=
"{'color_field': 'color', 'no_create': True}"
domain=
"[('ur_id', '=', ur_id)]"
/>
<field
name=
"segment_4_id"
widget=
"many2many_tags"
options=
"{'color_field': 'color', 'no_create': True}"
domain=
"[('ur_id', '=', ur_id)]"
/>
</group>
</group>
<field
name=
"subscription_ids"
attrs=
"{'invisible': [('type', '!=', 'contact')]}"
>
<tree
string=
"Subscriptions"
editable=
"bottom"
>
<field
name=
"newsletter_id"
domain=
"[]"
/>
<field
name=
"consent"
/>
</tree>
</field>
<field
name=
"supplier"
invisible=
"True"
/>
<field
name=
"customer"
invisible=
"True"
/>
<field
name=
"lang"
invisible=
"True"
/>
<field
name=
"image"
invisible=
"True"
/>
<field
name=
"user_id"
invisible=
"True"
/>
<field
name=
"ur_id"
invisible=
"True"
options=
'{"no_open": True, "no_create": True}'
/>
</sheet>
</form>
</field>
</record>
<record
id=
"view_partner_form_firstname_scop"
model=
"ir.ui.view"
>
<record
id=
"view_partner_form_firstname_scop"
model=
"ir.ui.view"
>
<field
name=
"name"
>
Add firstname and surnames for CGScop
</field>
<field
name=
"name"
>
Add firstname and surnames for CGScop
</field>
...
...
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