Skip to content
Extraits de code Groupes Projets
Valider b1923209 rédigé par Juliana's avatar Juliana
Parcourir les fichiers

[ADD]Add domain restrict PMO doc

parent 2d914b58
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -212,6 +212,8 @@ class OperationsService(Component): ...@@ -212,6 +212,8 @@ class OperationsService(Component):
# Récupération de tous les contrats liés à l'opération spécifiée # Récupération de tous les contrats liés à l'opération spécifiée
domain_c = [("acc_operation_id", "=", _id)] domain_c = [("acc_operation_id", "=", _id)]
domain_pmo = [("acc_operation_id", "=", _id)]
role = self._get_role(operation) role = self._get_role(operation)
if role.get("isConsumer") or role.get("isProductor"): if role.get("isConsumer") or role.get("isProductor"):
domain_c += [ domain_c += [
...@@ -220,6 +222,10 @@ class OperationsService(Component): ...@@ -220,6 +222,10 @@ class OperationsService(Component):
("type", "=", "vente_achat"), ("type", "=", "vente_achat"),
] ]
if role.get("isPmo"):
domain_pmo += [("type", "!=", False)]
acc_contract_ids = self.env["acc.contract"].search(domain_pmo)
else:
acc_contract_all = ( acc_contract_all = (
self.env["acc.contract"] self.env["acc.contract"]
.sudo() .sudo()
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter