Skip to content
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

Open
wants to merge 1 commit into
base: 12.0
Choose a base branch
from

Conversation

AungKoKoLin1997
Copy link
Contributor

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

Copy link
Member

@yostashiro yostashiro left a 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(
Copy link
Member

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.

Suggested change
is_zip = fields.Boolean(
zip_download = fields.Boolean(

@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 12.0-add-batch_report_pdf_zip branch 2 times, most recently from fff7379 to 67b5e44 Compare October 23, 2024 08:57
@AungKoKoLin1997 AungKoKoLin1997 changed the title [12.0][ADD] batch_report_pdf_zip [12.0][ADD] report_pdf_zip_download Oct 23, 2024
"author": "Quartile, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/reporting-engine",
"license": "AGPL-3",
"depends": ["base"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"depends": ["base"],
"depends": ["web"],

Copy link
Contributor Author

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) {
Copy link
Member

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...

Copy link
Member

@yostashiro yostashiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants