Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
A
acc_rest_api
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
Ce projet est archivé. Le dépôt et les autres ressources du projet sont en lecture seule.
Afficher davantage de fils d'Ariane
Le Filament
Opération Auto-Consommation Collective
acc_rest_api
Validations
4eaeaf33
Valider
4eaeaf33
rédigé
20 sept. 2022
par
Juliana
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
[UPD]Display/hide title depending numer contracts
parent
4725b2a3
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
1
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
1 fichier modifié
services/operation_services.py
+35
-0
35 ajouts, 0 suppression
services/operation_services.py
avec
35 ajouts
et
0 suppression
services/operation_services.py
+
35
−
0
Voir le fichier @
4eaeaf33
...
@@ -217,6 +217,7 @@ class OperationsService(Component):
...
@@ -217,6 +217,7 @@ class OperationsService(Component):
domain_c
+=
[
domain_c
+=
[
(
"
type
"
,
"
!=
"
,
"
convention
"
),
(
"
type
"
,
"
!=
"
,
"
convention
"
),
(
"
type
"
,
"
!=
"
,
"
all
"
),
(
"
type
"
,
"
!=
"
,
"
all
"
),
(
"
type
"
,
"
!=
"
,
"
pmo
"
),
(
"
type
"
,
"
!=
"
,
False
),
(
"
type
"
,
"
!=
"
,
False
),
]
]
if
role
.
get
(
"
isPmo
"
):
if
role
.
get
(
"
isPmo
"
):
...
@@ -228,6 +229,11 @@ class OperationsService(Component):
...
@@ -228,6 +229,11 @@ class OperationsService(Component):
])
])
acc_contract_ids
=
self
.
env
[
"
acc.contract
"
].
search
(
domain_c
)
acc_contract_ids
=
self
.
env
[
"
acc.contract
"
].
search
(
domain_c
)
acc_contract_ids
+=
acc_contract_all
acc_contract_ids
+=
acc_contract_all
acc_contract_pmo
=
self
.
env
[
"
acc.contract
"
].
search
([
(
"
acc_operation_id
"
,
"
=
"
,
_id
),
(
"
type
"
,
"
=
"
,
"
pmo
"
),
])
acc_contract_ids
+=
acc_contract_pmo
contract_exist
=
False
contract_exist
=
False
if
acc_contract_ids
:
if
acc_contract_ids
:
contract_exist
=
True
contract_exist
=
True
...
@@ -279,6 +285,20 @@ class OperationsService(Component):
...
@@ -279,6 +285,20 @@ class OperationsService(Component):
if
acc_contract_ids
if
acc_contract_ids
else
[]
else
[]
)
)
datas
[
"
contracts_pmo
"
]
=
(
acc_contract_pmo
.
mapped
(
lambda
n
:
{
"
id
"
:
n
.
id
,
"
name
"
:
n
.
name
,
"
start_date
"
:
n
.
start_date
,
"
end_date
"
:
n
.
end_date
,
"
type
"
:
n
.
type
,
"
url
"
:
base_url
+
n
.
get_portal_url
(),
}
)
if
acc_contract_pmo
else
[]
)
datas
[
"
contract_exist
"
]
=
contract_exist
datas
[
"
contract_exist
"
]
=
contract_exist
datas
[
"
invoice_exist
"
]
=
invoice_exist
datas
[
"
invoice_exist
"
]
=
invoice_exist
return
datas
return
datas
...
@@ -777,6 +797,21 @@ class OperationsService(Component):
...
@@ -777,6 +797,21 @@ class OperationsService(Component):
},
},
},
},
},
},
"
contracts_pmo
"
:
{
"
nullable
"
:
True
,
"
type
"
:
"
list
"
,
"
schema
"
:
{
"
type
"
:
"
dict
"
,
"
schema
"
:
{
"
id
"
:
{
"
type
"
:
"
integer
"
},
"
name
"
:
{
"
type
"
:
"
string
"
},
"
type
"
:
{
"
type
"
:
"
string
"
,
"
nullable
"
:
True
},
"
url
"
:
{
"
type
"
:
"
string
"
,
"
nullable
"
:
True
},
"
seller
"
:
{
"
type
"
:
"
string
"
,
"
nullable
"
:
True
},
"
buyer
"
:
{
"
type
"
:
"
string
"
,
"
nullable
"
:
True
},
},
},
},
}
}
def
_validator_get_pmo
(
self
):
def
_validator_get_pmo
(
self
):
...
...
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