odoo/odoo#173047

Created by fw-bot
Merged at 2a556d2a9b45b3ac6bc09fa01a952a0d52a94a29

Statuses:

label
odoo-dev:saas-17.2-17.0-fix-stock_delivery-partial-shipping-weight-opw-4028054-wama-ZuEr-fw
head
7a378bb49b39397ddba50312d7fdf963f3a5ea0c
merged
1 year ago by Logistics, Quentin Wolfs (quwo)
odoo/odoo
17.0 #172790
saas-17.1 #173038
saas-17.2 #173047
saas-17.3 #173054
saas-17.4 #173060
18.0
saas-18.1
saas-18.2
saas-18.3
master #173064

[FW][FIX] stock_delivery: incorrect shipping weight for partial transfers

Steps to reproduce:

  1. Create a product
    - Tracked by serial numbers
    - Set the weight to 2kg
    - Update the quantity on hands to 2 (with serials numbers)
  2. Create a transfer of 2 quantities of the product
  3. Open the detailed operations
  4. Set the quantity done on a single line
  5. Go back to the transfer and click put in pack
  6. Select any package

Before this commit:

The shipping weight is 4 kg instead of 2 kg, as it takes all lines regardless of their picked state.

After this commit:

Only the picked move lines are used to compute the shipping weight.

opw-4028054

Forward-Port-Of: #172790