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

[FIX] stock: fix text product label reports with special characters #151859

Conversation

robinengels
Copy link
Contributor

Current behavior:
When printing products ZPL Labels, special characters are not printed correctly. e.g. quotes become '

Steps to reproduce:

  • Modify a product name with special characters
  • Print a product label
  • Select ZPL Labels

opw-3684870

I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

@robodoo
Copy link
Contributor

robodoo commented Jan 30, 2024

@C3POdoo C3POdoo requested a review from a team January 30, 2024 17:32
Copy link
Contributor

@nle-odoo nle-odoo left a comment

Choose a reason for hiding this comment

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

looks good to me

the report is intended to be of qweb-text type and we should not escape text as if rendered in html

@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label Jan 30, 2024
@robinengels
Copy link
Contributor Author

@odoo/rd-security
@odoo/rd-logistics

@xmo-odoo
Copy link
Collaborator

@robinengels

@robinengels
Copy link
Contributor Author

@xmo-odoo sorry my message got lost. I'll need an excepetion for the security ci. I added a t-raw but the report is only rendered as test so it should not be an issue

@xmo-odoo
Copy link
Collaborator

@robinengels is there no risk of that being an issue for the barcode or default_code?

@robodoo override=ci/security

text rendering, so we specifically need to bypass HTML escaping

@robinengels
Copy link
Contributor Author

@xmo-odoo barcode should be only numbers so it shouldn't be an issue. But if someone ever comes up with a use case where they need special characters in the barcode we can change it yes.

@robinengels
Copy link
Contributor Author

@robodoo retry

@robodoo
Copy link
Contributor

robodoo commented Feb 2, 2024

I'm sorry, @robinengels: retry makes no sense when the PR is not in error.

@robinengels
Copy link
Contributor Author

@odoo/rd-logistics can you have a look at this ? Thanks

@ticodoo
Copy link
Contributor

ticodoo commented Feb 2, 2024

@robinengels seems ok to me, but wouldn't the same problem happen for label_lot_template_view (in the same file with <t t-out="lot.product_id.display_name"/>)

Also why are you targeting 17.0? Shouldn't it be for 15.0? Especially since the customer on that ticket is using saas-16.3?

@robinengels robinengels marked this pull request as draft February 5, 2024 10:07
Current behavior:
When printing products ZPL Labels, special characters are not printed
correctly. e.g. quotes become &#39;

Steps to reproduce:
- Modify a product name with special characters
- Print a product label
- Select ZPL Labels

As the report is only rendered as text, the special characters are not
dangerous and can be printed as is.

opw-3684870
@robinengels robinengels force-pushed the 17.0-opw-3684870-zebra_printer_special_chars-roen branch from ddc6ed5 to b35cbdf Compare February 5, 2024 10:08
@robinengels robinengels changed the base branch from 17.0 to 15.0 February 5, 2024 10:08
@robinengels
Copy link
Contributor Author

You'r right @ticodoo I created a new branch for the correct version here (#152657)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OE the report is linked to a support ticket (opw-...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants