Skip to content

Commit

Permalink
[FIX] l10n_ar_account_withholding: render report
Browse files Browse the repository at this point in the history
Now report render on mail_compose_message not fails when try
send the payment's mail

closes #709

Signed-off-by: Katherine Zaoral <kz@adhoc.com.ar>
  • Loading branch information
ica-adhoc committed Jun 8, 2023
1 parent 1698104 commit 2c7d36e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion l10n_ar_account_withholding/models/mail_compose_message.py
Expand Up @@ -19,7 +19,7 @@ def _onchange_template_id(self, template_id, composition_mode, model, res_id):
attachment_ids = []
for payment in payment_group.payment_ids.filtered(lambda p: p.payment_method_code == 'withholding'):
report_name = safe_eval.safe_eval(report.print_report_name, {'object': payment})
result, format = report._render(payment.ids)
result, format = self.env['ir.actions.report']._render(report.report_name, payment.ids)
file = base64.b64encode(result)
data_attach = {
'name': report_name,
Expand Down

0 comments on commit 2c7d36e

Please sign in to comment.