Skip to content

Commit

Permalink
[FIX] Publish customer messages on website
Browse files Browse the repository at this point in the history
  • Loading branch information
valentincastravete committed Jul 3, 2024
1 parent 4c8524c commit 7459726
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mail_private_no_published/models/mail_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,14 @@ def create(self, vals):
customer_users = user_ids.filtered(lambda user: user.has_group('base.group_portal'))
if customer_users or (partner_ids and not user_ids):
continue

author_id = rec.author_id
user = self.env['res.users'].search([
('partner_id', '=', author_id.id),
('active', 'in', [True, False]),
])
if not user or (user and not user.has_group('base.group_user')):
continue

rec.website_published = False
return res

0 comments on commit 7459726

Please sign in to comment.