Skip to content
Snippets Groups Projects
Commit 24db93c0 authored by alt-odoo's avatar alt-odoo
Browse files

[FIX] crm: allow regular salesman to convert and merge opportunities


If an internal user does not belong to Sales / Administrator group, and wants
to convert a lead into an opportunity, he will face an access rights error if
another lead exists with the same email because we are trying to merge them.
We should allow him to convert and merge them without error.

closes odoo/odoo#75216

Signed-off-by: default avatarAlex Tuyls <alt-odoo@users.noreply.github.com>
parent 076fe045
Branches
Tags
No related merge requests found
......@@ -136,7 +136,7 @@ class Lead2OpportunityPartner(models.TransientModel):
'user_id': self.user_id.id,
'team_id': self.team_id.id,
})
(to_merge - result_opportunity).unlink()
(to_merge - result_opportunity).sudo().unlink()
return result_opportunity
def _action_convert(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment