summaryrefslogtreecommitdiff
path: root/addons/website_mail
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-05-17 15:50:59 +0200
committerChristophe Simonis <chs@odoo.com>2019-05-17 15:50:59 +0200
commitd785adba6c09b0773bdd874182f450ba2ebe7c6d (patch)
tree5189f5dc30c84515eda62c4d6a512f552ae8f900 /addons/website_mail
parent8968a620105e2e79f2aa9d8db36b5408b89e92ee (diff)
parentc545783b95b15f65a9798003b614f75685dc434e (diff)
[MERGE] forward port branch 12.0 up to c545783b95b
Diffstat (limited to 'addons/website_mail')
-rw-r--r--addons/website_mail/models/mail_message.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/addons/website_mail/models/mail_message.py b/addons/website_mail/models/mail_message.py
index 34609160f1d..683990e1e67 100644
--- a/addons/website_mail/models/mail_message.py
+++ b/addons/website_mail/models/mail_message.py
@@ -26,6 +26,11 @@ class MailMessage(models.Model):
description = fields.Char(compute="_compute_description", help='Message description: either the subject, or the beginning of the body')
website_published = fields.Boolean(string='Published', help="Visible on the website as a comment", copy=False)
+ @api.model
+ def _non_employee_message_domain(self):
+ domain = super(MailMessage, self)._non_employee_message_domain()
+ return expression.AND([domain, [('website_published', '=', True)]])
+
@api.multi
def _compute_description(self):
for message in self: