[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#75283 X-original-commit: 24db93c0e6b88f89fdf03d63afee05fc858ed977 Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
This commit is contained in:
@@ -135,7 +135,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):
|
||||
|
||||
Reference in New Issue
Block a user