diff --git a/l10n_ch_report_optional/models/mail_template.py b/l10n_ch_report_optional/models/mail_template.py index 308cc91..5e471fe 100644 --- a/l10n_ch_report_optional/models/mail_template.py +++ b/l10n_ch_report_optional/models/mail_template.py @@ -25,6 +25,8 @@ def generate_email(self, res_ids, fields): if self.model == 'account.move': for record in self.env[self.model].browse(res_ids): + if record.move_type != 'out_invoice': + continue inv_print_name = self._render_field('report_name', record.ids, compute_lang=True)[record.id] new_attachments = [] if not self.env.company.l10n_ignore_qr_when_reconciled or record.payment_state != 'paid':