diff --git a/services/operation_services.py b/services/operation_services.py index 1fe452de26e4b1e399137ca05e685fef83fbabe4..92ff7d2199d78e2167b6898070235ba5927f3f6d 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(