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

Merged
merged 1 commit into from
Jan 6, 2025

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

@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 12.0-add-batch_report_pdf_zip branch from 67b5e44 to 94c2e6e Compare October 24, 2024 02:48
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.

Copy link

@kanda999 kanda999 left a comment

Choose a reason for hiding this comment

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

Functional review

@HviorForgeFlow
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 12.0-ocabot-merge-pr-942-by-HviorForgeFlow-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 9a5659e into OCA:12.0 Jan 6, 2025
3 of 4 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 4590a3f. Thanks a lot for contributing to OCA. ❤️

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

Successfully merging this pull request may close these issues.

5 participants