-
-
Notifications
You must be signed in to change notification settings - Fork 773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
9.0 Migrate report_custom_filename #52
9.0 Migrate report_custom_filename #52
Conversation
'object': objects[:1], | ||
'ext': report.report_type.replace('qweb-', ''), | ||
}) | ||
generated_filename = eval(report.download_filename, {'object': objects, 'time': time}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should use from openerp.tools.safe_eval import safe_eval
instead of eval
.
58aa429
to
43ba075
Compare
Your migration is ripping out the basic things of the module, so the fail in Travis is expected. Are you sure this is working? |
…lename like attachement
43ba075
to
db108e4
Compare
👍 I've tested this PR and seems to work fine, at least for the regular use case (document → print). Not sure if the removed controller is needed for some other use case, but Travis seems to be fine now. |
'object': objects[:1], | ||
'ext': report.report_type.replace('qweb-', ''), | ||
}) | ||
generated_filename = safe_eval(report.download_filename, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
safe_eval uses Python syntax, not Jinja2 syntax, so it changes from the way Odoo parses this in the attachments.
any updates ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a pending comment from my part
Closing as there's no answer. |
Hello,
I migrated report_custom_filename in v9 but I used the same format of attachement field instead of mako template.