Skip to content

Conversation

@ferran-S73
Copy link

@ferran-S73 ferran-S73 commented Dec 15, 2022

Allow exporting the pricelist report with product images. For scaling I set the images dimensions to be 64px at max.

During the development I found some images to be impossible to insert on xlsx, the only way I've found of checking it is by trying the Image.open() with the product image.

Here's an example of the resulting report:

imagen

imagen

@ferran-S73 ferran-S73 force-pushed the 14.0-imp-product_pricelist_direct_print branch from 293f1ba to 4dfe704 Compare December 16, 2022 12:08
Copy link
Contributor

@legalsylvain legalsylvain left a comment

Choose a reason for hiding this comment

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

Hi. Thanks for this improvment.
Could you apply changes on the pdf report also ?

@ferran-S73 ferran-S73 force-pushed the 14.0-imp-product_pricelist_direct_print branch 3 times, most recently from 586289c to 4de74f9 Compare December 22, 2022 14:55
@ferran-S73
Copy link
Author

Hi. Thanks for this improvment. Could you apply changes on the pdf report also ?

Hey @legalsylvain added support for product images on pdf report too!

@legalsylvain
Copy link
Contributor

Hi. Thanks.
I'd like to test the feature on ruboat, but all the CI is red. (runboat, github actions). See :

from PIL import Image, UnidentifiedImageError
ImportError: cannot import name 'UnidentifiedImageError'

Any idea ?

@ferran-S73
Copy link
Author

Hi. Thanks. I'd like to test the feature on ruboat, but all the CI is red. (runboat, github actions). See :

from PIL import Image, UnidentifiedImageError
ImportError: cannot import name 'UnidentifiedImageError'

Any idea ?

Maybe it has to do with the version of PIL that's installed in the runboat? I'll check it out but I'm not sure I can do anything

@legalsylvain
Copy link
Contributor

So, I suspect that you use another more recent version of Pilow.

At the first sight, it seems UnidentifiedImageError that has been introduced in version 7.0.0

@ferran-S73 ferran-S73 force-pushed the 14.0-imp-product_pricelist_direct_print branch from 4de74f9 to 3ccc0d8 Compare December 28, 2022 09:31
@ferran-S73
Copy link
Author

So, I suspect that you use another more recent version of Pilow.

At the first sight, it seems UnidentifiedImageError that has been introduced in version 7.0.0

Hi @legalsylvain , I couldn't find anything equivalent of UndefinedImageError in v5.4.1 so I changed it to a general Exception as it should work as fine here

@legalsylvain
Copy link
Contributor

Yes, v5.4.1 seems quite old !
This will be fixed in more recent version : Version 9.0.1 is pinned for V16 that is quite recent (April 2022).

Thanks.

@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 Apr 30, 2023
@ferran-S73
Copy link
Author

@OCA/product-maintainers could you please review this pr or maybe remove the stale label please?

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

Hi @ferran-S73. FYI, I'm migrating this module here : #1365

feel free to review this PR.

Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

Please forward port it to v15

/ocabot merge major

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 14.0-ocabot-merge-pr-1231-by-pedrobaeza-bump-major, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit dedfb9c into OCA:14.0 Jun 22, 2023
@OCA-git-bot
Copy link
Contributor

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

@bosd
Copy link
Contributor

bosd commented Feb 2, 2025

Todo Forward port to:
[ ] V 17 #2105
[ ] V 18 #2106

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