Skip to content

Commit c8832b4

Browse files
committed
[FIX] auth_signup: Server Error when sending message on task with portal
- Let's consider a product P (invocing policy based on timesheet and creating new task) - Create a quotation with the product P for a customer with portal access CPU - Confirm it (A new task T is created) - Go to T and add a follower (who is another portal user PU (third party)) in the task but uncheck the box to send him an email - Connect to the portal with PU - Go to T and send a message Bug: A server error was raised. opw:2270074 closes odoo#52675 X-original-commit: 2a924b4 Signed-off-by: Simon Goffin (sig) <[email protected]>
1 parent f80613f commit c8832b4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

addons/auth_signup/models/res_partner.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,11 @@ def signup_get_auth_param(self):
109109

110110
allow_signup = self.env['res.users']._get_signup_invitation_scope() == 'b2c'
111111
for partner in self:
112-
if allow_signup and not partner.sudo().user_ids:
113-
partner = partner.sudo()
112+
partner = partner.sudo()
113+
if allow_signup and not partner.user_ids:
114114
partner.signup_prepare()
115115
res[partner.id]['auth_signup_token'] = partner.signup_token
116-
elif partner.sudo().user_ids:
116+
elif partner.user_ids:
117117
res[partner.id]['auth_login'] = partner.user_ids[0].login
118118
return res
119119

0 commit comments

Comments
 (0)