From 2f21e04e630ec53b5e60e0b65832bbdf4e1399c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Fri, 20 Aug 2021 09:06:50 +0000 Subject: [PATCH] [REV] crm: remove unnecessary sudo Revert "[FIX] crm: allow regular salesman to convert and merge opportunities" This reverts commit 24db93c0e6b88f89fdf03d63afee05fc858ed977. Indeed adding a sudo at the end of merge process is a strange way to fix an unexplained issue about "similar emails". CRM code has been cleaned since v14+ and flows should not gain random sudo trying to solve an undefined problem. closes odoo/odoo#75385 X-original-commit: b4fa19376eb50bf07b5753b4664fcad4d637bcec Signed-off-by: Thibault Delavallee (tde) --- addons/crm/wizard/crm_lead_to_opportunity.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/crm/wizard/crm_lead_to_opportunity.py b/addons/crm/wizard/crm_lead_to_opportunity.py index beaa45d2196..b24314c75af 100644 --- a/addons/crm/wizard/crm_lead_to_opportunity.py +++ b/addons/crm/wizard/crm_lead_to_opportunity.py @@ -135,7 +135,7 @@ class Lead2OpportunityPartner(models.TransientModel): 'user_id': self.user_id.id, 'team_id': self.team_id.id, }) - (to_merge - result_opportunity).sudo().unlink() + (to_merge - result_opportunity).unlink() return result_opportunity def _action_convert(self):