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

[14.0][ADD] report_xlsx_pdf: print directly to PDF from xlsx #637

Closed

Conversation

TheMule71
Copy link

Extend report xlsx to export directly to pdf.

Copy link

@andreampiovesana andreampiovesana left a comment

Choose a reason for hiding this comment

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

ok

@andreampiovesana
Copy link

add in manifest
"external_dependencies": {
"python": ["xlsxwriter"],
"deb": ["libreoffice"],
},

@TheMule71 TheMule71 force-pushed the 14.0-imp-report_xlsx_pdf_module branch from f680c05 to 94b7689 Compare July 21, 2022 19:13
@scigghia
Copy link

why this error in runboat?

++ oca_list_external_dependencies deb

however for me it is ok


For testing it is also necessary ``xlrd`` Python module installed::

$ pip3 install xlrd

Choose a reason for hiding this comment

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

I would add libreoffice installed as a requirement as well (only on Linux systems for now).

_inherit = "ir.actions.report"

report_xlsx_to_pdf = fields.Boolean(
string="Report xlsx to pdf",

Choose a reason for hiding this comment

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

Suggested change
string="Report xlsx to pdf",
string="Export to pdf format",

Comment on lines 4 to 5
"name": "Extend report xlsx to export directly to pdf",
"summary": "Extend report xlsx to export directly to pdf",

Choose a reason for hiding this comment

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

Suggested change
"name": "Extend report xlsx to export directly to pdf",
"summary": "Extend report xlsx to export directly to pdf",
"name": "Export xlsx report to pdf",
"summary": "Extend report_xlsx to export directly to pdf",

@@ -0,0 +1 @@
This module extend xlsx report to convert in pdf using libreoffice

Choose a reason for hiding this comment

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

Suggested change
This module extend xlsx report to convert in pdf using libreoffice
This module extend ``report_xlsx`` to convert xlsx to pdf using libreoffice.

@TheMule71 TheMule71 force-pushed the 14.0-imp-report_xlsx_pdf_module branch from 94b7689 to 634cd7e Compare July 26, 2022 16:46
@TheMule71
Copy link
Author

why this error in runboat?

++ oca_list_external_dependencies deb

however for me it is ok

I'm at loss here. It's looking for the wrong file, the correct link is:

http://security.ubuntu.com/ubuntu/pool/main/p/python3.8/libpython3.8_3.8.10-0ubuntu1~20.04.5_amd64.deb

not

http://security.ubuntu.com/ubuntu/pool/main/p/python3.8/libpython3.8_3.8.10-0ubuntu1~20.04.4_amd64.deb

but I'm not sure how to fix it.

@sbidoul (sorry to bother you)
Maybe do an apt-get update
before this apt-get install here?
https://github.com/OCA/oca-ci/blob/cffeb8853b2833c5a47da3200b4e3025b47de043/bin/oca_install_addons#L28

I might be completely off track, tho. I've never looked at those scripts before.

@TheMule71 TheMule71 requested a review from primes2h July 26, 2022 17:07
@primes2h
Copy link

@TheMule71
Please mark PR as ready for review.

@TheMule71
Copy link
Author

@TheMule71 Please mark PR as ready for review.

OK, but tests are still failing.

@TheMule71 TheMule71 marked this pull request as ready for review July 27, 2022 11:38
@sbidoul
Copy link
Member

sbidoul commented Jul 27, 2022

Maybe do an apt-get update before this apt-get install here?

@TheMule71 yes that's what we need to do. There is an open issue for that in oca/oca-ci (OCA/oca-ci#26). Would you like to do a PR for that ?

@etobella
Copy link
Member

Now it is green and ready to review 😄

@TheMule71
Copy link
Author

Now it is green and ready to review smile

Thanks!

Maybe do an apt-get update before this apt-get install here?

@TheMule71 yes that's what we need to do. There is an open issue for that in oca/oca-ci (OCA/oca-ci#26). Would you like to do a PR for that ?

Looks like @etobella beat me to that. :)

Copy link

@primes2h primes2h left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks!

@andreampiovesana
Copy link

merge?

Copy link
Member

@etobella etobella left a comment

Choose a reason for hiding this comment

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

Readme is not complete.

Tests are for report_xlsx, can you test the transformation?

report_xlsx_pdf/readme/USAGE.rst Show resolved Hide resolved
@@ -0,0 +1,10 @@
Make sure you have ``xlsxwriter`` Python module installed::
Copy link
Member

Choose a reason for hiding this comment

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

This comes from report_xlsx, so it is probably not needed here. The only thing needed is libreoffice in this case, as xlsxwriter comes from report_xlsx

active_model="res.partner"
)
self.report_name = "report_xlsx.partner_xlsx"
self.report_xlsx_to_pdf = True
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand this. It is never used... You never tested that is is transformed. This test is for report_xlsx standard. Can you test the code from this module?

Choose a reason for hiding this comment

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

self.report_xlsx_to_pdf = True
is the new parameter for this app

Copy link
Member

@etobella etobella Aug 27, 2023

Choose a reason for hiding this comment

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

But you are editing self, in this case, the TestClass, it does not make sense. You should do self.xlsx_report.report_xlsx_to_pdf = True

Copy link
Member

Choose a reason for hiding this comment

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

@andreampiovesana can you attend this comment? Thanks!

@andreampiovesana
Copy link

for new merge of PR #628
you shoud change
image

@TheMule71 TheMule71 force-pushed the 14.0-imp-report_xlsx_pdf_module branch from 634cd7e to ea5a63a Compare September 2, 2022 09:58
@andreampiovesana
Copy link

merge?

@francesco-ooops
Copy link
Contributor

merge?

@andreampiovesana have @etobella 's remarks been addressed?

@andreampiovesana
Copy link

andreampiovesana commented Oct 11, 2022 via email

@andreampiovesana
Copy link

@OCA/reporting-engine-maintainers we use this app in production and this fix many situations where print in qweb-pdf take too much time to export, specially with report with hundreds of pages and we use the same technology of py3o.
Please can you merge?

@github-actions
Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Mar 12, 2023
@HviorForgeFlow
Copy link
Member

ping @etobella

@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Mar 19, 2023
@github-actions
Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jul 23, 2023
@github-actions github-actions bot closed this Aug 27, 2023
@etobella etobella reopened this Aug 27, 2023
@etobella
Copy link
Member

Reopening, as the necessary change is minimal. Can you review it @TheMule71 @andreampiovesana

@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Sep 3, 2023
Copy link

github-actions bot commented Jan 7, 2024

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jan 7, 2024
Copy link
Member

@HviorForgeFlow HviorForgeFlow left a comment

Choose a reason for hiding this comment

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

Minor changes required, after that, it can be merged :)

active_model="res.partner"
)
self.report_name = "report_xlsx.partner_xlsx"
self.report_xlsx_to_pdf = True
Copy link
Member

Choose a reason for hiding this comment

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

@andreampiovesana can you attend this comment? Thanks!

{
"name": "Export xlsx report to pdf",
"summary": "Extend report_xlsx to export directly to pdf",
"author": "Openindustry.it," "Odoo Community Association (OCA)",
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
"author": "Openindustry.it," "Odoo Community Association (OCA)",
"author": "Openindustry.it, Odoo Community Association (OCA)",

@github-actions github-actions bot closed this Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.