From 1a460ce37e8060122cd336b68c7f56bcb2cd8e51 Mon Sep 17 00:00:00 2001
From: Juliana <juliana@le-filament.com>
Date: Thu, 25 Aug 2022 11:37:19 +0200
Subject: [PATCH] [ADD]Add type contract for all
---
services/operation_services.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/services/operation_services.py b/services/operation_services.py
index 1fe452d..92ff7d2 100644
--- a/services/operation_services.py
+++ b/services/operation_services.py
@@ -245,13 +245,15 @@ class OperationsService(Component):
("type", "!=", "convention"),
("type", "!=", False),
]
- # if role.get("isProductor"):
- # domain += [("type", "=", "vente")]
if role.get("isPmo"):
domain_pmo += [("type", "!=", False)]
acc_contract_ids = self.env["acc.contract"].sudo().search(domain_pmo)
else:
+ acc_contract_all = self.env["acc.contract"].sudo().search([
+ ("acc_operation_id", "=", _id), ("type", "=", "all"),
+ ])
acc_contract_ids = self.env["acc.contract"].search(domain)
+ acc_contract_ids += acc_contract_all
datas["contracts"] = (
acc_contract_ids.mapped(
--
GitLab