summaryrefslogtreecommitdiff
path: root/addons/website_mail
diff options
context:
space:
mode:
authorGoffin Simon <sig@odoo.com>2019-05-15 13:21:53 +0000
committerGoffin Simon <sig@odoo.com>2019-05-17 03:18:08 +0000
commit2c3451de12bd120d0d72f7b50803f42e89f2f141 (patch)
tree794324a03fac1c05655656fcac712477a9226b2a /addons/website_mail
parent838d557eafd04a81086eb7ebe3fe280ff366cb73 (diff)
[FIX] portal, website_mail: Wrong dependance
The field website_published is not ensured when module portal is installed because the module portal doesn't depend on module website_mail. PS:The module website_mail depends on the module portal because website_mail depends on website and website depends on portal. opw:1997478 closes odoo/odoo#33452 Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
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: