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
3100674b
Valider
3100674b
rédigé
Il y a 5 ans
par
Rémi - Le Filament
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Fix décès action
parent
677df426
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
views/res_partner_cooperative.xml
+1
-1
1 ajout, 1 suppression
views/res_partner_cooperative.xml
wizard/scop_deces_wizard.py
+22
-30
22 ajouts, 30 suppressions
wizard/scop_deces_wizard.py
wizard/scop_deces_wizard.xml
+0
-1
0 ajout, 1 suppression
wizard/scop_deces_wizard.xml
avec
23 ajouts
et
32 suppressions
views/res_partner_cooperative.xml
+
1
−
1
Voir le fichier @
3100674b
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
<form
string=
"Cooperatives"
>
<form
string=
"Cooperatives"
>
<header>
<header>
<button
string=
"Nouvelle période"
type=
"action"
name=
"%(cgscop_partner.scop_period_wizard_create_action)d"
class=
"oe_highlight"
attrs=
"{'invisible': ['|', ('write_date', '=', False), ('project_status', '!=', '5_suivi')]}"
/>
<button
string=
"Nouvelle période"
type=
"action"
name=
"%(cgscop_partner.scop_period_wizard_create_action)d"
class=
"oe_highlight"
attrs=
"{'invisible': ['|', ('write_date', '=', False), ('project_status', '!=', '5_suivi')]}"
/>
<button
string=
"Décés/Mise en sommeil"
type=
"action"
name=
"%(cgscop_partner.scop_deces_wizard_create_action)d"
class=
"oe_highlight"
attrs=
"{'invisible': [('project_status', '!=', '5_suivi')]}"
/>
<button
string=
"Décés/Mise en sommeil"
type=
"action"
name=
"%(cgscop_partner.scop_deces_wizard_create_action)d"
class=
"oe_highlight"
attrs=
"{'invisible': [
'|', ('write_date', '=', False),
('project_status', '!=', '5_suivi')]}"
/>
<field
name=
"project_status"
widget=
"statusbar"
clickable=
"True"
statusbar_visible=
"1_information,2_pre-diagnostic,3_accompagnement,4_adhesion,5_suivi"
/>
<field
name=
"project_status"
widget=
"statusbar"
clickable=
"True"
statusbar_visible=
"1_information,2_pre-diagnostic,3_accompagnement,4_adhesion,5_suivi"
/>
</header>
</header>
<sheet>
<sheet>
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
wizard/scop_deces_wizard.py
+
22
−
30
Voir le fichier @
3100674b
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from
odoo
import
api
,
fields
,
models
from
odoo
import
api
,
fields
,
models
from
odoo.exceptions
import
ValidationError
class
ScopDecesWizard
(
models
.
TransientModel
):
class
ScopDecesWizard
(
models
.
TransientModel
):
...
@@ -16,30 +17,17 @@ class ScopDecesWizard(models.TransientModel):
...
@@ -16,30 +17,17 @@ class ScopDecesWizard(models.TransientModel):
@api.model
@api.model
def
_default_last_period_id
(
self
):
def
_default_last_period_id
(
self
):
return
self
.
env
[
'
scop.period
'
].
search
(
return
self
.
env
[
'
scop.period
'
].
search
(
[(
'
partner_id
'
,
'
=
'
,
self
.
env
.
context
.
get
(
'
active_id
'
))
]
,
[(
'
partner_id
'
,
'
=
'
,
self
.
env
.
context
.
get
(
'
active_id
'
)),
order
=
'
create_date desc
'
,
(
'
end_reason
'
,
'
=
'
,
False
)]
,
limit
=
1
)
limit
=
1
)
.
id
# Fields common
# Fields common
partner_id
=
fields
.
Integer
(
'
Partner
'
,
default
=
_default_partner_id
)
partner_id
=
fields
.
Integer
(
'
Partner
'
,
default
=
_default_partner_id
)
# Fields previous period
# Fields previous period
last_period_id
=
fields
.
One2many
(
last_period_id
=
fields
.
Integer
(
default
=
_default_last_period_id
)
comodel_name
=
'
scop.period
'
,
inverse_name
=
'
partner_id
'
,
string
=
"
Dernière période
"
,
default
=
_default_last_period_id
)
end
=
fields
.
Date
(
end
=
fields
.
Date
(
'
Fin de validité
'
,
required
=
True
,
default
=
fields
.
Date
.
today
())
'
Fin de validité
'
,
required
=
True
,
default
=
fields
.
Date
.
today
())
end_reason
=
fields
.
Selection
(
[(
'
juri
'
,
"
Modification de la forme juridique
"
),
(
'
form
'
,
"
Changement de forme coopérative
"
),
(
'
acti
'
,
"
Changement d
'
activité (NAF)
"
),
(
'
adr
'
,
"
Changement d
'
adresse
"
),
(
'
nom
'
,
"
Changement de dénomination sociale
"
),
(
'
autr
'
,
"
Autres
"
)],
string
=
'
Motif
'
,
default
=
'
autr
'
)
dissolution_reason_id
=
fields
.
Many2one
(
dissolution_reason_id
=
fields
.
Many2one
(
'
res.partner.dissolution.reason
'
,
'
res.partner.dissolution.reason
'
,
string
=
"
Motif Décés
"
,
string
=
"
Motif Décés
"
,
...
@@ -51,10 +39,11 @@ class ScopDecesWizard(models.TransientModel):
...
@@ -51,10 +39,11 @@ class ScopDecesWizard(models.TransientModel):
def
deces_action
(
self
):
def
deces_action
(
self
):
# Close previous period
# Close previous period
last_period_id
=
self
.
env
[
'
scop.period
'
].
browse
(
last_period_id
=
self
.
env
[
'
scop.period
'
].
browse
(
self
.
last_period_id
.
id
)
self
.
last_period_id
)
if
last_period_id
:
last_period_id
.
write
({
last_period_id
.
write
({
'
end
'
:
self
.
end
,
'
end
'
:
self
.
end
,
'
end_reason
'
:
self
.
end_reason
,
'
end_reason
'
:
'
autr
'
,
'
comments
'
:
self
.
comments
,
'
comments
'
:
self
.
comments
,
})
})
...
@@ -64,3 +53,6 @@ class ScopDecesWizard(models.TransientModel):
...
@@ -64,3 +53,6 @@ class ScopDecesWizard(models.TransientModel):
'
dissolution_date
'
:
self
.
end
,
'
dissolution_date
'
:
self
.
end
,
'
dissolution_reason_id
'
:
self
.
dissolution_reason_id
.
id
'
dissolution_reason_id
'
:
self
.
dissolution_reason_id
.
id
})
})
else
:
raise
ValidationError
(
"
Il n
'
existe pas de période à fermer.
"
)
Ce diff est replié.
Cliquez pour l'agrandir.
wizard/scop_deces_wizard.xml
+
0
−
1
Voir le fichier @
3100674b
...
@@ -10,7 +10,6 @@
...
@@ -10,7 +10,6 @@
<field
name=
"end"
/>
<field
name=
"end"
/>
<field
name=
"dissolution_reason_id"
/>
<field
name=
"dissolution_reason_id"
/>
<field
name=
"comments"
/>
<field
name=
"comments"
/>
<field
name=
"end_reason"
invisible=
"1"
/>
</group>
</group>
<footer>
<footer>
<button
class=
"btn btn-sm btn-primary"
name=
"deces_action"
string=
"Créer"
type=
"object"
confirm=
"Êtes-vous sûr de vouloir clôturer la dernière période ?"
/>
<button
class=
"btn btn-sm btn-primary"
name=
"deces_action"
string=
"Créer"
type=
"object"
confirm=
"Êtes-vous sûr de vouloir clôturer la dernière période ?"
/>
...
...
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