diff options
| author | Goffin Simon <sig@odoo.com> | 2020-05-26 13:57:55 +0000 |
|---|---|---|
| committer | Goffin Simon <sig@odoo.com> | 2020-05-27 08:44:58 +0000 |
| commit | 0d569c8117feb712570af2498923a10d859cff33 (patch) | |
| tree | 9d7b7ad0b658684312616924ee3bbcd1b4947d86 /addons | |
| parent | 181c7d82e30d0848bbac7f7d0188e81aced0af07 (diff) | |
[FIX] auth_signup: 403 when sending message on task with portal
Steps to reproduce the bug:
- Let's consider a product P (invocing policy based on timesheet and creating new task)
- Create a quotation with the product P
- Confirm it (A new task T is created)
- Go to T and add a follower (who is a portal user PU) 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 403 error was raised
opw:2239844
closes odoo/odoo#51953
X-original-commit: c7e864e039dd2c948a5c61df29052313c6a659ce
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/auth_signup/models/res_partner.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/auth_signup/models/res_partner.py b/addons/auth_signup/models/res_partner.py index 259a5838b30..245453b47aa 100644 --- a/addons/auth_signup/models/res_partner.py +++ b/addons/auth_signup/models/res_partner.py @@ -113,7 +113,7 @@ class ResPartner(models.Model): partner = partner.sudo() partner.signup_prepare() res[partner.id]['auth_signup_token'] = partner.signup_token - elif partner.user_ids: + elif partner.sudo().user_ids: res[partner.id]['auth_login'] = partner.user_ids[0].login return res |
