Skip to content

Commit

Permalink
Merge cd016c9 into d77bdd3
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanRijnhart committed Dec 18, 2019
2 parents d77bdd3 + cd016c9 commit 38b896f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions report_qweb_pdf_watermark/models/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
from PIL import PdfImagePlugin # noqa: F401
except ImportError:
pass
from odoo import api, models, tools
from odoo import api, models
from odoo.tools.safe_eval import safe_eval

logger = getLogger(__name__)

Expand All @@ -35,7 +36,7 @@ def get_pdf(self, docids, report_name, html=None, data=None):
if report.pdf_watermark:
watermark = b64decode(report.pdf_watermark)
elif report.pdf_watermark_expression:
watermark = tools.safe_eval(
watermark = safe_eval(
report.pdf_watermark_expression,
dict(env=self.env, docs=self.env[report.model].browse(docids)),
)
Expand Down

0 comments on commit 38b896f

Please sign in to comment.