diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-10-03 18:52:09 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-10-03 18:52:09 +0200 |
| commit | e6c27216bee1198a76895496f2ea19e7466b8df5 (patch) | |
| tree | f80b4a12f013c93710e224aa8c33bb0875b34489 /addons/portal/controllers | |
| parent | 8ea5637c1df66700def8b012515e603c8e31aa07 (diff) | |
| parent | 1d90e93543ba5bbc432b11c20d96172680d2bf6e (diff) | |
[MERGE] forward port branch saas-11.4 up to 1d90e93543b
Diffstat (limited to 'addons/portal/controllers')
| -rw-r--r-- | addons/portal/controllers/mail.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/addons/portal/controllers/mail.py b/addons/portal/controllers/mail.py index bfe59057391..dcccbb61fa1 100644 --- a/addons/portal/controllers/mail.py +++ b/addons/portal/controllers/mail.py @@ -100,8 +100,10 @@ class PortalChatter(http.Controller): # Only search into website_message_ids, so apply the same domain to perform only one search # extract domain from the 'website_message_ids' field field_domain = request.env[res_model]._fields['website_message_ids'].domain - domain += field_domain(request.env[res_model]) if callable(field_domain) else field_domain - domain += [('res_id', '=', res_id)] + if callable(field_domain): + field_domain = field_domain(request.env[res_model]) + domain = expression.AND([domain, field_domain, [('res_id', '=', res_id)]]) + # Check access Message = request.env['mail.message'] if kw.get('token'): |
