mirror of
https://gitlab.com/flectra-community/l10n-switzerland-flectra.git
synced 2024-12-23 04:41:45 +00:00
✨ Settings to define if ISR and QR should be added to email template, and also if it should only be done when invoice is not paid
->l10n_ch_report_optional
This commit is contained in:
parent
c10ba87c3f
commit
4ee306f1b1
@ -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':
|
||||
|
Loading…
Reference in New Issue
Block a user