Skip to content

Commit

Permalink
[FIX] l10n_it_sdi_channel: Followers Propagation
Browse files Browse the repository at this point in the history
  • Loading branch information
SirTakobi committed Sep 14, 2022
1 parent d76627a commit ba89377
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions l10n_it_sdi_channel/models/fatturapa_attachment.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,16 @@ def _message_auto_subscribe_followers(
# but only if all the attachments share the same SdI channel
channel = self.mapped('channel_id')
if all(attachment.channel_id == channel for attachment in self):
for partner_follower in channel.message_partner_ids:
res.append((
partner_follower.id,
default_subtype_ids,
False,
))
subtype_model = self.env['mail.message.subtype']
child_ids, def_ids, all_int_ids, parent, relation = \
subtype_model._get_auto_subscription_subtypes(self._name)
for channel_follower in channel.message_follower_ids:
for channel_subtype in channel_follower.subtype_ids:
attachment_subtype_id = parent.get(channel_subtype.id)
if attachment_subtype_id:
res.append((
channel_follower.partner_id.id,
[attachment_subtype_id],
False,
))
return res

0 comments on commit ba89377

Please sign in to comment.