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

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

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Feb 29, 2024

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

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

opw-3684870

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

Forward-Port-Of: #152657

@robodoo
Copy link
Contributor

robodoo commented Feb 29, 2024

@fw-bot
Copy link
Contributor Author

fw-bot commented Feb 29, 2024

@robinengels @clesgow cherrypicking of pull request #152657 failed.

stdout:

Auto-merging addons/stock/report/product_templates.xml
CONFLICT (content): Merge conflict in addons/stock/report/product_templates.xml
Auto-merging addons/stock/tests/test_report.py
CONFLICT (content): Merge conflict in addons/stock/tests/test_report.py

stderr:

11:55:31.717547 git.c:463               trace: built-in: git cherry-pick c6007285253806d2a6880fa8dfc54b7e840b4e1e
error: could not apply c60072852538... [FIX] stock: fix text product label reports with special characters
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
----------
status:

Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?).

In the former case, you may want to edit this PR message as well.

⚠️ after resolving this conflict, you will need to merge it via @robodoo.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label Feb 29, 2024
@robodoo robodoo added forwardport This PR was created by @fw-bot conflict There was an error while creating this forward-port PR labels Feb 29, 2024
@robinengels robinengels force-pushed the saas-15.2-15.0-opw-3684870-zebra_printer_special_chars-roen-59Gc-fw branch 3 times, most recently from 2631055 to ae096ae Compare March 1, 2024 09:55
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

X-original-commit: 4c2e92d
@robinengels robinengels force-pushed the saas-15.2-15.0-opw-3684870-zebra_printer_special_chars-roen-59Gc-fw branch from ae096ae to 36900f5 Compare March 1, 2024 13:13
@robinengels robinengels requested a review from clesgow March 4, 2024 09:14
<t t-if="env.user.has_group('stock.group_stock_lot_print_gs1')">
<t t-if="lot.product_id.valid_ean" t-set="final_barcode" t-value="'01' + '0' * (14 - len(lot.product_id.barcode)) + lot.product_id.barcode"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

@clesgow My fix has changed a bit because of this new part. I modified the test so that it should also cover this part.

@filisbits
Copy link
Contributor

@robinengels @clesgow Not to add some pressure, but this is wrecking havoc on the upgrades.

@aj-fuentes
Copy link
Contributor

Just FYI. We need to ensure that PRs adding models/fields to stable versions should be merged at the beginning of the week and the FW ports handled timely during the week when possible. This avoids failed upgrades when the fresh sources are pulled.

@clesgow
Copy link
Contributor

clesgow commented Mar 5, 2024

@robodoo r+

@robodoo
Copy link
Contributor

robodoo commented Mar 5, 2024

@clesgow you may want to rebuild or fix this PR as it has failed CI.

@clesgow
Copy link
Contributor

clesgow commented Mar 5, 2024

@odoo/rd-security
Hello, the PR had to modified due to a merge conflict & new code introduced in 15.2, so it needs an override once again, for the same reasons as the original PR.

@mart-e
Copy link
Contributor

mart-e commented Mar 5, 2024

@robodoo override=ci/security
Reason: #151859 (comment)

robodoo pushed a commit that referenced this pull request Mar 5, 2024
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

closes #155853

X-original-commit: 4c2e92d
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
@robodoo robodoo closed this Mar 5, 2024
@fw-bot fw-bot deleted the saas-15.2-15.0-opw-3684870-zebra_printer_special_chars-roen-59Gc-fw branch March 19, 2024 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conflict There was an error while creating this forward-port PR forwardport This PR was created by @fw-bot 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

8 participants