Skip to content

Commit

Permalink
[FIX] send email to both: company and it's child
Browse files Browse the repository at this point in the history
  • Loading branch information
corredato committed Jul 29, 2024
1 parent 7674f2b commit 67239a3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions l10n_br_fiscal/models/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,8 +448,11 @@ def send_email(self):
email_template_id = self._get_email_template()
if email_template_id:
partner_ids = self.partner_id.filtered("edoc_send_email")
partner_ids |= self.partner_id.child_ids.filtered("edoc_send_email")
self.message_subscribe(partner_ids=partner_ids.ids)
partner_child_ids = self.partner_id.child_ids.filtered("edoc_send_email")
all_partner_ids = partner_ids | partner_child_ids

self.message_subscribe(partner_ids=all_partner_ids.ids)

attachment_ids = []
if self.authorization_file_id:
attachment_ids.append(self.authorization_file_id.id)
Expand Down

0 comments on commit 67239a3

Please sign in to comment.