diff options
| author | Goffin Simon <sig@odoo.com> | 2019-04-30 12:42:27 +0000 |
|---|---|---|
| committer | Goffin Simon <sig@odoo.com> | 2019-05-02 08:24:08 +0000 |
| commit | ff839147527111c777ebe2aa799834ec969cca30 (patch) | |
| tree | 0d1764f6661bcbacdc237337a5de39adfead8032 /addons/portal/controllers | |
| parent | 81877310bc3247a0d9998194e6561e04b8706098 (diff) | |
[FIX] portal: Hide messages when unpublished for portal
Steps to reproduce the bug:
- Create a SO and go to my/account
- Share the SO with a portal user P
- Go to on the website
- Write a message in the chatter and unpublish it
- Log as P and go to the SO
Bug:
The unpublished message was displayed.
Same logic as: https://github.com/odoo/odoo/commit/d79678fdd5faccffff65a439653fa5d639a3d3c4
opw:1969524
closes odoo/odoo#33053
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Diffstat (limited to 'addons/portal/controllers')
| -rw-r--r-- | addons/portal/controllers/mail.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/portal/controllers/mail.py b/addons/portal/controllers/mail.py index dcccbb61fa1..dc83f05a3d2 100644 --- a/addons/portal/controllers/mail.py +++ b/addons/portal/controllers/mail.py @@ -112,7 +112,7 @@ class PortalChatter(http.Controller): raise Forbidden() # Non-employee see only messages with not internal subtype (aka, no internal logs) if not request.env['res.users'].has_group('base.group_user'): - domain = expression.AND([['&', ('subtype_id', '!=', False), ('subtype_id.internal', '=', False)], domain]) + domain = expression.AND([['&', '&', ('subtype_id', '!=', False), ('subtype_id.internal', '=', False), ('website_published', '=', True)], domain]) Message = request.env['mail.message'].sudo() return { 'messages': Message.search(domain, limit=limit, offset=offset).portal_message_format(), |
