odoo/odoo#196681

Created by fw-bot
Merged at ffa48cd67aa7b4796ca399a576fde30aeeb95816

Statuses:

label
odoo-dev:saas-17.2-17.0-stock-fix_result_package_duplicate-mama-409716-fw
head
d81abc8306989fde8372902878e7e3e64b0ff47c
merged
8 months ago by Logistics, Mathias Mathy (mama)
odoo/odoo
17.0 #193745
saas-17.2 #196681
saas-17.4 #196691
18.0 #196701
saas-18.1 #196711
saas-18.2
saas-18.3
saas-18.4
19.0
master #196715

[FW][FIX] stock: wrong result_package_id

When forcefully unreserving then reserving products coming from a same package for multiple pickings, the source package is wrongly propagated as destination package on the multiple pickings.

To reproduce:
- -i sale_stock,sale_management
- Create a storable product (I) with 30 qty on hand
- Create and confirm an internal transfer to put the product I in a pack (P)
- Create and confirm two SO :
- Sell 10 I
- Sell 20 I
- Check the 2 SO delivery pickings (D):
- Each are reserved from pack P
- They don't have any 'Destination Package' [Expected]
- From the picking list view, by selecting the 2 pickings D :
- 'Unreserve' them both
- 'Check Availability' them both
- Check the pickings D:
- Each are reserved from pack P
- Each have 'Destination Package' P [Faulty]

opw-4272573

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

Forward-Port-Of: #193745