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,iot: incorrect docids in ZPL label layout wizard #162700

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Apr 19, 2024

Steps to reproduce:

  1. Go to IoT > Devices
  2. Select a device and add the report "Lot/Serial Number (ZPL)"
  3. Create a product tracked by lots
  4. Purchase 5 units of this product
  5. Validate the reception (with a lot)
  6. Print labels > Lot/SN Labels
    • Quantity to print: One per unit
    • Format: ZPL Labels

Before this commit:

When printing labels for multiple lots of the same product, the wizard was incorrectly generating the docids as a list[list[int]]. It works correctly as the ids are joined thanks to JavaScript magic. However, when sending the report to an IoT device, the ids are sent as-is in the context, which raises an error when calling browse().

After this commit:

The docids are now generated as a flat list of integers, which is correct and works as expected.

opw-3850631

Forward-Port-Of: #162063
Forward-Port-Of: #161932

Steps to reproduce:
1. Go to IoT > Devices
2. Select a device and add the report "Lot/Serial Number (ZPL)"
3. Create a product tracked by lots
4. Purchase 5 units of this product
5. Validate the reception (with a lot)
6. Print labels > Lot/SN Labels
    - Quantity to print: One per unit
    - Format: ZPL Labels

Before this commit:
When printing labels for multiple lots of the same product, the wizard
was incorrectly generating the docids as a `list[list[int]]`. It works
correctly as the ids are joined thanks to JavaScript magic. However,
when sending the report to an IoT device, the ids are sent as-is in
the context, which raises and error when calling `browse()`.

After this commit:
The docids are now generated as a flat list of integers, which is
correct and works as expected.

opw-3850631

X-original-commit: 7386def
@robodoo
Copy link
Contributor

robodoo commented Apr 19, 2024

@fw-bot
Copy link
Contributor Author

fw-bot commented Apr 19, 2024

This PR targets saas-17.1 and is part of the forward-port chain. Further PRs will be created up to master.

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

@robodoo robodoo added the forwardport This PR was created by @fw-bot label Apr 19, 2024
@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label Apr 19, 2024
robodoo pushed a commit that referenced this pull request Apr 19, 2024
Steps to reproduce:
1. Go to IoT > Devices
2. Select a device and add the report "Lot/Serial Number (ZPL)"
3. Create a product tracked by lots
4. Purchase 5 units of this product
5. Validate the reception (with a lot)
6. Print labels > Lot/SN Labels
    - Quantity to print: One per unit
    - Format: ZPL Labels

Before this commit:
When printing labels for multiple lots of the same product, the wizard
was incorrectly generating the docids as a `list[list[int]]`. It works
correctly as the ids are joined thanks to JavaScript magic. However,
when sending the report to an IoT device, the ids are sent as-is in
the context, which raises and error when calling `browse()`.

After this commit:
The docids are now generated as a flat list of integers, which is
correct and works as expected.

opw-3850631

closes #162700

X-original-commit: 7386def
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
Signed-off-by: Walravens Mathieu (wama) <wama@odoo.com>
@robodoo robodoo closed this Apr 20, 2024
@fw-bot fw-bot deleted the saas-17.1-16.0-opw-3850631-fix-zpl-iot-wama-GUme-fw branch May 4, 2024 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

4 participants