Skip to content
Snippets Groups Projects
Commit cdefbf8d authored by Nicolas Martinelli's avatar Nicolas Martinelli
Browse files

[FIX] mail: message for `AccessError`


`AccessError` requires the argument `msg`. Therefore, even if this error
is catched, we need to provide one, otherwise a `TypeError` is raised.

opw-2183184

closes odoo/odoo#44447

Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
parent aea056ce
No related branches found
No related tags found
No related merge requests found
......@@ -90,7 +90,7 @@ class MailController(http.Controller):
# redirect to the messaging.
suggested_company = record_sudo._get_mail_redirect_suggested_company()
if not suggested_company:
raise AccessError()
raise AccessError('')
cids = cids + [suggested_company.id]
record_sudo.with_user(uid).with_context(allowed_company_ids=cids).check_access_rule('read')
except AccessError:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment