Skip to content

[18.0][IMP] delivery_ups_oca: Convert label from GIF to PDF#1127

Open
carlos-lopez-tecnativa wants to merge 1 commit intoOCA:18.0from
Tecnativa:18.0-delivery_ups_oca-label
Open

[18.0][IMP] delivery_ups_oca: Convert label from GIF to PDF#1127
carlos-lopez-tecnativa wants to merge 1 commit intoOCA:18.0from
Tecnativa:18.0-delivery_ups_oca-label

Conversation

@carlos-lopez-tecnativa
Copy link
Contributor

UPS can return the label in GIF format instead of PDF. When trying to print the image directly from the attachment using the base_report_to_printer module, it is not possible because GIF is not supported. In this case, convert the label from GIF to PDF.

TT58440
@Tecnativa @pedrobaeza @carlosdauden @sergio-teruel could you please review this?

UPS can return the label in GIF format instead of PDF.
When trying to print the image directly from the attachment using
the base_report_to_printer module, it is not possible because GIF is not supported.
In this case, convert the label from GIF to PDF.
@pedrobaeza pedrobaeza added this to the 18.0 milestone Feb 27, 2026
@carlos-lopez-tecnativa
Copy link
Contributor Author

I noticed that this PR #1113 adds a similar feature, but with more changes. In the future, they could be unified. @sudhir-erpharbor, could you please review this PR as well while your PR is being finalized?

Comment on lines +172 to +173
label["format_code"] = "PDF"
format_code = "PDF"
Copy link
Member

Choose a reason for hiding this comment

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

No need to do these 2 variable assignment, as it's not being used further.

Suggested change
label["format_code"] = "PDF"
format_code = "PDF"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No need to do these 2 variable assignment, as it's not being used further.

Are used in the attachment_name

Copy link
Member

Choose a reason for hiding this comment

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

OK, but only the second one. And taking the occasion, I don't usually like extensions in upper, so it may be changed.

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