Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
A
afac_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
AFAC
afac_partner
Validations
cc13b5ac
Valider
cc13b5ac
rédigé
Il y a 10 mois
par
Thibaud - Le Filament
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
[UPD] Added label_haie fields to res.partner
parent
59717f65
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion
!4
[UPD] Added label_haie fields to res.partner
Modifications
2
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
2 fichiers modifiés
models/res_partner.py
+13
-0
13 ajouts, 0 suppression
models/res_partner.py
views/res_partner.xml
+50
-17
50 ajouts, 17 suppressions
views/res_partner.xml
avec
63 ajouts
et
17 suppressions
models/res_partner.py
+
13
−
0
Voir le fichier @
cc13b5ac
...
@@ -114,6 +114,8 @@ class ResPartner(models.Model):
...
@@ -114,6 +114,8 @@ class ResPartner(models.Model):
string
=
"
Champs à copier
"
,
string
=
"
Champs à copier
"
,
compute
=
"
_compute_copy_to_clipboard
"
,
compute
=
"
_compute_copy_to_clipboard
"
,
)
)
label_haie
=
fields
.
Char
()
show_label_haie
=
fields
.
Boolean
(
compute
=
"
_compute_show_label_haie
"
,
store
=
True
)
# ------------------------------------------------------
# ------------------------------------------------------
# SQL Constraints
# SQL Constraints
# ------------------------------------------------------
# ------------------------------------------------------
...
@@ -156,6 +158,17 @@ class ResPartner(models.Model):
...
@@ -156,6 +158,17 @@ class ResPartner(models.Model):
res
=
res
.
replace
(
"
\n\n
"
,
"
\n
"
)
res
=
res
.
replace
(
"
\n\n
"
,
"
\n
"
)
record
.
fields_to_copy_to_clipboard
=
res
.
lstrip
()
record
.
fields_to_copy_to_clipboard
=
res
.
lstrip
()
@api.depends
(
"
project_ids
"
)
def
_compute_show_label_haie
(
self
):
label_haie_project
=
self
.
env
[
"
afac.project
"
].
search
(
[(
"
name
"
,
"
=
"
,
"
Label Haie
"
)]
)
for
partner
in
self
:
if
label_haie_project
in
partner
.
project_ids
.
mapped
(
"
project_id
"
):
partner
.
show_label_haie
=
True
else
:
partner
.
show_label_haie
=
False
@api.model
@api.model
def
_get_default_address_format_simple
(
self
):
def
_get_default_address_format_simple
(
self
):
return
"
%(street)s
\n
%(street2)s
\n
%(street3)s
\n
%(zip)s %(city)s
"
return
"
%(street)s
\n
%(street2)s
\n
%(street3)s
\n
%(zip)s %(city)s
"
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
views/res_partner.xml
+
50
−
17
Voir le fichier @
cc13b5ac
...
@@ -210,9 +210,9 @@
...
@@ -210,9 +210,9 @@
<div
<div
t-attf-class=
"badge badge-pill o_tag_color_#{record.mandate_id_color.raw_value}"
t-attf-class=
"badge badge-pill o_tag_color_#{record.mandate_id_color.raw_value}"
>
>
<span
class=
"o_badge_text"
>
<t
<span
class=
"o_badge_text"
>
t-esc=
"record.mandate_id.value"
<t
t-esc=
"record.mandate_id.value"
/>
/>
</span>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -260,6 +260,11 @@
...
@@ -260,6 +260,11 @@
<field
name=
"legal_representative"
optional=
"hide"
/>
<field
name=
"legal_representative"
optional=
"hide"
/>
<field
name=
"project_ids"
widget=
"many2many_tags"
optional=
"hide"
/>
<field
name=
"project_ids"
widget=
"many2many_tags"
optional=
"hide"
/>
<field
name=
"short_name"
optional=
"hide"
/>
<field
name=
"short_name"
optional=
"hide"
/>
<field
name=
"show_label_haie"
invisible=
"True"
/>
<field
name=
"label_haie"
attrs=
"{'invisible': [('show_label_haie','=', False)]}"
/>
</xpath>
</xpath>
<field
name=
"user_id"
position=
"attributes"
>
<field
name=
"user_id"
position=
"attributes"
>
<attribute
name=
"invisible"
>
1
</attribute>
<attribute
name=
"invisible"
>
1
</attribute>
...
@@ -384,22 +389,28 @@
...
@@ -384,22 +389,28 @@
<span
class=
"o_form_label o_td_label"
name=
"address_name"
>
<span
class=
"o_form_label o_td_label"
name=
"address_name"
>
<b
<b
attrs=
"{'invisible': ['|', ('parent_id', '=', False), ('type', '!=', 'contact')]}"
attrs=
"{'invisible': ['|', ('parent_id', '=', False), ('type', '!=', 'contact')]}"
>
Adresse de la Société
</b>
>
Adresse de la Société
</b>
<b
<b
attrs=
"{'invisible': ['|', ('parent_id', '=', False), ('type', '!=', 'invoice')]}"
attrs=
"{'invisible': ['|', ('parent_id', '=', False), ('type', '!=', 'invoice')]}"
>
Adresse de facturation
</b>
>
Adresse de facturation
</b>
<b
<b
attrs=
"{'invisible': ['|', ('parent_id', '=', False), ('type', '!=', 'delivery')]}"
attrs=
"{'invisible': ['|', ('parent_id', '=', False), ('type', '!=', 'delivery')]}"
>
Adresse de livraison
</b>
>
Adresse de livraison
</b>
<b
<b
attrs=
"{'invisible': ['|', ('parent_id', '=', False), ('type', '!=', 'other')]}"
attrs=
"{'invisible': ['|', ('parent_id', '=', False), ('type', '!=', 'other')]}"
>
Autre adresse
</b>
>
Autre adresse
</b>
<b
<b
attrs=
"{'invisible': ['|', ('parent_id', '=', False), ('type', '!=', 'private')]}"
attrs=
"{'invisible': ['|', ('parent_id', '=', False), ('type', '!=', 'private')]}"
>
Adresse Privée
</b>
>
Adresse Privée
</b>
<b
<b
attrs=
"{'invisible': ['&', ('parent_id', '!=', False), ('type', '!=', False)]}"
attrs=
"{'invisible': ['&', ('parent_id', '!=', False), ('type', '!=', False)]}"
>
Adresse
</b>
>
Adresse
</b>
</span>
</span>
</xpath>
</xpath>
<xpath
expr=
"//field[@name='category_id']"
position=
"attributes"
>
<xpath
expr=
"//field[@name='category_id']"
position=
"attributes"
>
...
@@ -451,7 +462,18 @@
...
@@ -451,7 +462,18 @@
<xpath
expr=
"//field[@name='child_ids']"
position=
"attributes"
>
<xpath
expr=
"//field[@name='child_ids']"
position=
"attributes"
>
<attribute
<attribute
name=
"context"
name=
"context"
>
{'default_parent_id': active_id, 'default_street': street, 'default_street2': street2, 'default_city': city, 'default_state_id': state_id, 'default_zip': zip, 'default_country_id': country_id, 'default_lang': lang, 'default_user_id': user_id, 'default_type': 'contact', 'default_thematic_id': thematic_id, 'default_org_type_id': org_type_id, 'default_college_id': college_id, 'default_region_id': region_id, 'default_website': website, 'default_short_name': short_name, 'default_legal_status_id': legal_status_id, 'default_legal_status_detail_id': legal_status_detail_id}
</attribute>
>
{'default_parent_id': active_id, 'default_street': street,
'default_street2': street2, 'default_city': city,
'default_state_id': state_id, 'default_zip': zip,
'default_country_id': country_id, 'default_lang': lang,
'default_user_id': user_id, 'default_type': 'contact',
'default_thematic_id': thematic_id, 'default_org_type_id':
org_type_id, 'default_college_id': college_id,
'default_region_id': region_id, 'default_website': website,
'default_short_name': short_name, 'default_legal_status_id':
legal_status_id, 'default_legal_status_detail_id':
legal_status_detail_id}
</attribute>
</xpath>
</xpath>
<xpath
<xpath
expr=
"//field[@name='child_ids']/kanban/field[@name='display_name']"
expr=
"//field[@name='child_ids']/kanban/field[@name='display_name']"
...
@@ -478,16 +500,19 @@
...
@@ -478,16 +500,19 @@
<div
<div
t-attf-class=
"badge badge-pill o_tag_color_#{record.mandate_id_color.raw_value}"
t-attf-class=
"badge badge-pill o_tag_color_#{record.mandate_id_color.raw_value}"
>
>
<span
class=
"o_badge_text"
>
<t
<span
class=
"o_badge_text"
>
t-esc=
"record.mandate_id.value"
<t
t-esc=
"record.mandate_id.value"
/>
/>
</span>
</span>
</div>
</div>
</div>
</div>
</t>
</t>
<t
t-if=
"record.is_legal_representative.raw_value"
>
<t
t-if=
"record.is_legal_representative.raw_value"
>
<p><span
<p>
<span
class=
"badge badge-pill badge-danger"
class=
"badge badge-pill badge-danger"
>
Représentant Légal
</span></p>
>
Représentant Légal
</span>
</p>
</t>
</t>
</xpath>
</xpath>
<xpath
<xpath
...
@@ -553,6 +578,14 @@
...
@@ -553,6 +578,14 @@
position=
"before"
position=
"before"
>
>
<page
name=
"projects"
string=
"Projets"
>
<page
name=
"projects"
string=
"Projets"
>
<group>
<field
name=
"show_label_haie"
invisible=
"1"
/>
<field
name=
"label_haie"
attrs=
"{'invisible': [('show_label_haie','=', False)]}"
/>
</group>
<field
name=
"project_ids"
>
<field
name=
"project_ids"
>
<tree>
<tree>
<field
<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