[FIX] auth_signup: Not possible to send message in a task from the portal
Steps to reproduce: - Let's consider the portal user Pu, the project Pr and the task Ta - Add Pu as a follower of Pr - Log as Pu and open Ta - Try to post a message Bug: An access error was raised due to the rule "res_partner: portal/public: read access on my commercial partner". opw:2070320 closes odoo/odoo#36960 Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
This commit is contained in:
@@ -109,7 +109,7 @@ class ResPartner(models.Model):
|
||||
|
||||
allow_signup = self.env['res.users']._get_signup_invitation_scope() == 'b2c'
|
||||
for partner in self:
|
||||
if allow_signup and not partner.user_ids:
|
||||
if allow_signup and not partner.sudo().user_ids:
|
||||
partner = partner.sudo()
|
||||
partner.signup_prepare()
|
||||
res[partner.id]['auth_signup_token'] = partner.signup_token
|
||||
|
||||
Reference in New Issue
Block a user