Browse Source

Update report_py3o/models/ir_actions_report.py

In v 14.0 time module is already in safe_eval https://github.com/odoo/odoo/blob/14.0/odoo/tools/safe_eval.py#L38

Co-authored-by: mourad-ehm <mourad.elhadj.mimoune@akretion.com>
14.0-report-py3o-pr-506
Elmeri Niemelä 4 years ago
committed by default
parent
commit
eb5919ae2b
  1. 2
      report_py3o/models/ir_actions_report.py

2
report_py3o/models/ir_actions_report.py

@ -180,7 +180,7 @@ class IrActionsReport(models.Model):
report = self.get_from_report_name(self.report_name, self.report_type) report = self.get_from_report_name(self.report_name, self.report_type)
if report.print_report_name and not len(res_ids) > 1: if report.print_report_name and not len(res_ids) > 1:
obj = self.env[self.model].browse(res_ids) obj = self.env[self.model].browse(res_ids)
return safe_eval(report.print_report_name, {"object": obj, "time": time})
return safe_eval(report.print_report_name, {"object": obj,})
return "{}.{}".format(self.name, self.py3o_filetype) return "{}.{}".format(self.name, self.py3o_filetype)
def _get_attachments(self, res_ids): def _get_attachments(self, res_ids):

Loading…
Cancel
Save