-
-
Notifications
You must be signed in to change notification settings - Fork 795
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
[12.0][ADD] report_pdf_zip_download #942
base: 12.0
Are you sure you want to change the base?
Conversation
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.
How about report_pdf_zip_download
as the module name?
class IrActionsReport(models.Model): | ||
_inherit = "ir.actions.report" | ||
|
||
is_zip = fields.Boolean( |
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.
To be a bit more descriptive.
is_zip = fields.Boolean( | |
zip_download = fields.Boolean( |
fff7379
to
67b5e44
Compare
"author": "Quartile, Odoo Community Association (OCA)", | ||
"website": "https://github.com/OCA/reporting-engine", | ||
"license": "AGPL-3", | ||
"depends": ["base"], |
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.
"depends": ["base"], | |
"depends": ["web"], |
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.
I updated the code.
|
||
ActionManager.include({ | ||
|
||
_downloadReportZIP: function (url, actions) { |
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.
I feel that there must be a better way to handle zip downloads, but I don't have a concrete suggestion...
67b5e44
to
94c2e6e
Compare
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.
Code review.
This module generates one PDF report per record, and the reports are compiled into a ZIP file if the user prints multiple records at once. If the user prints a single record, it will follow Odoo's standard behavior and will generate just a single PDF file.
@qrtl QT4419