odoo/odoo#162700

Created by fw-bot
label
odoo-dev:saas-17.1-16.0-opw-3850631-fix-zpl-iot-wama-GUme-fw
head
7e7d353896ce0c38eb492ee7be2e2b74493a0920
target
saas-17.1
merged
1 month ago by Walravens Mathieu (wama)
forward-port of
odoo/odoo#161932

[FW][FIX] stock,iot: incorrect docids in ZPL label layout wizard

## 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: odoo/odoo#162063
Forward-Port-Of: odoo/odoo#161932