Skip to content

Commit

Permalink
[IMP] Make notes also non website published
Browse files Browse the repository at this point in the history
  • Loading branch information
valentincastravete committed Jul 3, 2024
1 parent d8eb774 commit fcbc0a2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mail_private_no_published/models/mail_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ def _check_archive(self):
def create(self, vals):
res = super().create(vals)
for rec in res:
if rec.subtype_id == self.env.ref('mail.mt_note'):
rec.website_published = False
continue

partner_ids = rec.partner_ids.ids
user_ids = self.env['res.users'].search([
('partner_id', 'in', partner_ids),
Expand Down

0 comments on commit fcbc0a2

Please sign in to comment.