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
25512092
Valider
25512092
rédigé
28 févr. 2022
par
Benjamin - Le Filament
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
[MIG] fix views and buttons errors
parent
536a0931
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
+4
-5
4 ajouts, 5 suppressions
models/res_partner.py
views/res_partner.xml
+16
-27
16 ajouts, 27 suppressions
views/res_partner.xml
avec
20 ajouts
et
32 suppressions
models/res_partner.py
+
4
−
5
Voir le fichier @
25512092
...
...
@@ -778,7 +778,7 @@ class ScopPartner(models.Model):
result
=
super
(
ScopPartner
,
self
).
write
(
vals
)
# Hack pour notification lors de la modification du logo
if
"
image
"
in
vals
:
if
"
image
_128
"
in
vals
:
self
.
message_post
(
body
=
"
Modification Logo
"
,
subtype
=
"
cgscop_base.cg_values_change
"
,
...
...
@@ -1242,8 +1242,6 @@ class ScopPartner(models.Model):
"
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
,
"
ur_id
"
:
self
.
ur_id
.
id
,
...
...
@@ -1293,8 +1291,6 @@ class ScopPartner(models.Model):
"
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
,
},
...
...
@@ -1317,6 +1313,9 @@ class ScopPartner(models.Model):
"
target
"
:
"
new
"
,
}
def
write_contact
(
self
):
return
self
# ------------------------------------------------------
# Affichage des coop avec filtre par défaut
# ------------------------------------------------------
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
views/res_partner.xml
+
16
−
27
Voir le fichier @
25512092
...
...
@@ -277,14 +277,11 @@
<field
name=
"project_status"
widget=
"statusbar"
clickable=
"True"
statusbar_visible=
"1_information,2_pre-diagnostic,3_accompagnement,4_adhesion"
attrs=
"{'invisible':[('project_status','in',('6_suivi'))]}"
/>
</header>
</xpath>
<!-- Masque le bouton Archiver -->
<!-- <xpath expr="//button[@name='toggle_active']" position="attributes">-->
<!-- <attribute name="attrs">{'invisible': ['&', ('is_cooperative','=', True), ('project_status', '!=', '7_abandonne')]}</attribute>-->
<!-- </xpath>-->
<!-- Titre, logo & status -->
<xpath
expr=
"//h1"
position=
"before"
>
<div
class=
"oe_button_box"
name=
"button_box"
attrs=
"{'invisible': [('is_cooperative', '!=', True)]}"
>
<!-- Partie statique avant Notebook -->
<xpath
expr=
"//form/sheet/group"
position=
"before"
>
<div
attrs=
"{'invisible': [('is_cooperative', '!=', True)]}"
>
<h3>
<span
class=
"o_field_header o_field_widget o_readonly_modifier"
attrs=
"{'invisible':[('dissolution_reason_id','=', False)]}"
>
Décédée le
</span>
<field
name=
"dissolution_date"
readonly=
"1"
attrs=
"{'invisible':[('dissolution_reason_id','=', False)]}"
/>
...
...
@@ -294,8 +291,6 @@
<field
options=
"{'no_open': True}"
name=
"dissolution_reason_id"
readonly=
"1"
attrs=
"{'invisible':[('dissolution_reason_id','=', False)]}"
/>
</h3>
</div>
</xpath>
<xpath
expr=
"//h1"
position=
"after"
>
<div
class=
"oe_title oe_title_cgscop"
attrs=
"{'invisible': [('is_cooperative', '!=', True)]}"
>
<field
name=
"is_cooperative"
invisible=
"1"
/>
<field
name=
"write_date"
invisible=
"1"
/>
...
...
@@ -314,17 +309,19 @@
</div>
<div
class=
"o_row d-flex "
>
<h3>
<field
name=
"membership_status"
readonly=
"
True
"
class=
"o_field_header"
/>
<field
name=
"membership_status"
readonly=
"
1
"
class=
"o_field_header"
/>
</h3>
<h3>
<field
name=
"member_number_int"
readonly=
"
True
"
class=
"o_field_header"
/>
<field
name=
"member_number_int"
readonly=
"
1
"
class=
"o_field_header"
attrs=
"{'invisible':[('member_number_int', '=', 0)]}"
/>
</h3>
</div>
<div
class=
"o_row d-flex "
>
<h3>
<span
name=
"cae"
class=
"o_field_widget o_readonly_modifier o_field_header oe_read_only"
attrs=
"{'invisible':[('cae','=',False)]}"
>
CAE
</span>
<label
for=
'
cae
'
string=
"CAE"
class=
"oe_edit_only"
/>
<label
for=
"
cae
"
string=
"CAE"
class=
"oe_edit_only"
/>
<field
name=
"cae"
class=
"oe_edit_only"
attrs=
"{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')]}"
/>
</h3>
<field
name=
"user_id"
invisible=
"
True
"
/>
<field
name=
"user_id"
invisible=
"
1
"
/>
</div>
</div>
</div>
...
...
@@ -418,7 +415,7 @@
attrs=
"{
'invisible': ['|', '&', ('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement')), ('is_ag_constitution', '!=', True), ('cooperative_form_id', '=', %(cgscop_partner.form_noncooperative)d)],
'required': ['|', ('project_status', 'in', ('4_adhesion', '5_cg', '6_suivi')), ('is_ag_constitution', '=', True), ('is_cooperative', '=', True), ('cooperative_form_id', '!=', %(cgscop_partner.form_noncooperative)d)],
'readonly': [('project_status', '=', '6_suivi'), ('is_administrative', '!=', True)]}"
/>
'readonly': [
('id','!=',False),
('project_status', '=', '6_suivi'), ('is_administrative', '!=', True)]}"
/>
<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=
"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}"
/>
...
...
@@ -437,7 +434,7 @@
<field
name=
"first_closeout"
attrs=
"{
'required':[('is_cooperative', '!=', False), ('project_status', 'in', ('4_adhesion', '5_cg', '6_suivi')), ('cooperative_form_id', '!=', %(cgscop_partner.form_noncooperative)d)],
'invisible': ['|', ('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement')), ('cooperative_form_id', '=', %(cgscop_partner.form_noncooperative)d)],
'readonly': [('project_status', '=', '6_suivi'), ('is_administrative', '!=', True)]}"
/>
'readonly': [
('id','!=',False),
('project_status', '=', '6_suivi'), ('is_administrative', '!=', True)]}"
/>
<field
name=
"closeout_month"
attrs=
"{'required':[('project_status','in',('4_adhesion', '5_cg', '6_suivi'))], 'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}"
/>
<field
name=
"is_seed_scop"
attrs=
"{'invisible': [('project_status', '=', '1_information')]}"
/>
<field
name=
"seed_end"
attrs=
"{'invisible': [('is_seed_scop', '!=', True)], 'required':[('project_status','in',('4_adhesion', '5_cg', '6_suivi')),('is_seed_scop', '=', True)]}"
/>
...
...
@@ -496,7 +493,7 @@
<div
class=
"o_kanban_image"
>
<img
alt=
"Contact image"
t-if=
"record.image_128.raw_value"
t-att-src=
"kanban_image('res.partner', 'image_128', record.id.raw_value)"
/>
<t
t-if=
"!record.image_128.raw_value"
>
<img
alt=
"Avatar"
t-att-src=
'
_s +
"
/base/static/img/avatar.png
"
'
/>
<img
alt=
"Avatar"
t-att-src=
"
_s +
'
/base/static/img/avatar
_grey
.png'
"
/>
</t>
</div>
<div
class=
"oe_kanban_details"
>
...
...
@@ -560,8 +557,8 @@
<img
alt=
"Delivery"
t-if=
"record.type.raw_value === 'delivery'"
t-att-src=
'_s + "/base/static/img/truck.png"'
/>
<img
alt=
"Invoice"
t-if=
"record.type.raw_value === 'invoice'"
t-att-src=
'_s + "/base/static/img/money.png"'
/>
<t
t-if=
"record.type.raw_value !== 'invoice' && record.type.raw_value !== 'delivery'"
>
<img
alt=
"Logo"
t-if=
"record.is_company.raw_value === true"
t-att-src=
'
_s +
"
/base/static/img/company_image.png
"
'
/>
<img
alt=
"Avatar"
t-if=
"record.is_company.raw_value === false"
t-att-src=
'_s + "/base/static/img/avatar.png"'
/>
<img
alt=
"Logo"
t-if=
"record.is_company.raw_value === true"
t-att-src=
"
_s +
'
/base/static/img/company_image.png'
"
/>
<img
alt=
"Avatar"
t-if=
"record.is_company.raw_value === false"
t-att-src=
'_s + "/base/static/img/avatar
_grey
.png"'
/>
</t>
</t>
</div>
...
...
@@ -776,10 +773,6 @@
<field
name=
"arch"
type=
"xml"
>
<form
string=
"Contact Dirigeant"
>
<sheet>
<div
class=
"oe_button_box"
name=
"button_box"
>
<widget
name=
"web_ribbon"
text=
"Archived"
bg_color=
"bg-danger"
attrs=
"{'invisible': [('active', '=', True)]}"
/>
<field
name=
"active"
invisible=
"1"
/>
</div>
<field
name=
"parent_id_onchange"
invisible=
"1"
/>
<field
name=
"parent_id"
invisible=
"1"
/>
<group
col=
"2"
>
...
...
@@ -818,7 +811,7 @@
<field
name=
"ur_id"
invisible=
"1"
/>
</sheet>
<footer>
<button
name=
"write"
type=
"object"
string=
"Sauvegarder"
class=
"btn-primary"
/>
<button
name=
"write
_contact
"
type=
"object"
string=
"Sauvegarder"
class=
"btn-primary"
/>
<button
name=
"cancel"
string=
"Fermer"
special=
"cancel"
class=
"oe_link"
/>
</footer>
</form>
...
...
@@ -834,10 +827,6 @@
<field
name=
"arch"
type=
"xml"
>
<form
string=
"Contacts / Addresses"
>
<sheet>
<!-- <div class="oe_button_box" name="button_box">-->
<widget
name=
"web_ribbon"
text=
"Archived"
bg_color=
"bg-danger"
attrs=
"{'invisible': [('active', '=', True)]}"
/>
<field
name=
"active"
invisible=
"1"
/>
<!-- </div>-->
<field
name=
"type"
required=
"1"
widget=
"radio"
options=
"{'horizontal': true}"
/>
<field
name=
"parent_id_onchange"
invisible=
"1"
/>
<field
name=
"parent_id"
invisible=
"1"
/>
...
...
@@ -903,7 +892,7 @@
<field
name=
"ur_id"
invisible=
"1"
options=
'{"no_open": True, "no_create": True}'
/>
</sheet>
<footer>
<button
name=
"write"
type=
"object"
string=
"Sauvegarder"
class=
"btn-primary"
/>
<button
name=
"write
_contact
"
type=
"object"
string=
"Sauvegarder"
class=
"btn-primary"
/>
<button
name=
"cancel"
string=
"Fermer"
special=
"cancel"
class=
"oe_link"
/>
</footer>
</form>
...
...
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