-
- Downloads
[FIX] stock: check SN uniqueness by location
To reproduce the issue:
1. In Settings, enable:
- Storage Locations
- Package
2. Create a product P
- Type: Storable
- Tracked by SN
3. Process a receipt with 1 x P, serial S
4. Return P in a package
5. Process a new receipt with 1 x P, still S as SN
Error: An error is displayed "The serial number has already been
assigned [...]". This is incorrect, the user should be able to
receive that SN.
After step 3, there exists a quant Q1: -1 x P at Supplier Location
with S. Then, after step 4, a new quant Q2 is created: 1 x P at
Supplier Location with S and the package. Because the field
`package_id` is not the same on Q1 and Q2, both quants are not merged.
As a result, step 5, we will update Q1 and have -2 x P at Supplier
Location with S. This will trigger the constraint, hence the error
message.
OPW-3390615
closes odoo/odoo#134478
Signed-off-by:
William Henrotin (whe) <whe@odoo.com>
Loading
Please register or sign in to comment