Skip to content

Commit

Permalink
[ADD] xml and danfe in attachments
Browse files Browse the repository at this point in the history
  • Loading branch information
corredato committed Jul 25, 2024
1 parent 1cffec3 commit 5d35fbd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion l10n_br_fiscal/models/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,15 @@ def send_email(self):
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)
self.message_post_with_template(template_id=email_template_id.id)
attachment_ids = []
if self.authorization_file_id:
attachment_ids.append(self.authorization_file_id.id)
if self.file_report_id:
attachment_ids.append(self.file_report_id.id)

self.message_post_with_template(
template_id=email_template_id.id, attachment_ids=attachment_ids
)

def _after_change_state(self, old_state, new_state):
self.ensure_one()
Expand Down

0 comments on commit 5d35fbd

Please sign in to comment.