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

[UPD]Update field to check tab display

parent e4a8d3f5
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -695,6 +695,7 @@ class OperationsService(Component): ...@@ -695,6 +695,7 @@ class OperationsService(Component):
"isPmo": {"type": "boolean"}, "isPmo": {"type": "boolean"},
"isConsumer": {"type": "boolean"}, "isConsumer": {"type": "boolean"},
"isProductor": {"type": "boolean"}, "isProductor": {"type": "boolean"},
"isDataCdc": {"type": "boolean"},
}, },
}, },
"id": {"type": "integer"}, "id": {"type": "integer"},
...@@ -1010,7 +1011,15 @@ class OperationsService(Component): ...@@ -1010,7 +1011,15 @@ class OperationsService(Component):
"isPmo": False, "isPmo": False,
"isConsumer": False, "isConsumer": False,
"isProductor": False, "isProductor": False,
"isDataCdc": False
} }
# check if data exists to display tab
last_record = self.env["acc.enedis.cdc"].search([
("acc_operation_id", "=", operation_id.id)])
if last_record:
role["isDataCdc"] = True
# Get partner from user and parent # Get partner from user and parent
partner_ids = self.env["res.users"].browse(self.request.uid).partner_id partner_ids = self.env["res.users"].browse(self.request.uid).partner_id
......
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