[FIX] website_crm_partner_assign: modify lead
- As admin, create an opportunity - Under the tab Assigned partner set the portal user - As portal user go to My account > My opportunities > Edit opportunity - Change something Confirm button doesn't work. In fact, an access error is raised silently in the JS console. The issue is raised in `update_lead_portal`, at `lead.activity_ids...`. This is because the field `activity_ids` has `groups="base.group_user"`. opw-1817935 opw-1818629
This commit is contained in:
committed by
Nicolas Martinelli
parent
132137939c
commit
2d6c2a7dca
@@ -233,7 +233,7 @@ class CrmLead(models.Model):
|
||||
# will be modified by the portal form. If no activity exist we create a new one instead
|
||||
# that we assign to the portal user.
|
||||
|
||||
user_activity = lead.activity_ids.filtered(lambda activity: activity.user_id == self.env.user)[:1]
|
||||
user_activity = lead.sudo().activity_ids.filtered(lambda activity: activity.user_id == self.env.user)[:1]
|
||||
if values['activity_date_deadline']:
|
||||
if user_activity:
|
||||
user_activity.sudo().write({
|
||||
|
||||
Reference in New Issue
Block a user