summaryrefslogtreecommitdiff
path: root/addons/website_mail
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-06-06 11:54:35 +0200
committerChristophe Simonis <chs@odoo.com>2019-06-06 11:54:35 +0200
commit71a50a2214748fec413c5a0f042d0e7172ae6ea9 (patch)
tree2e9ee11551350e23923390d9c53baf630b6ed834 /addons/website_mail
parenta7621137cb0d75ec545152d5e1d413c9d3548e45 (diff)
parent409679866b2ee8352a8cb27460e7332563526924 (diff)
[MERGE] forward port branch saas-12.3 up to 409679866b2
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: