[FIX] stock: UoM on return lot
- Create a product with: Product UoM: kg Purchase UoM: lb(s) Tracking: By lot(s) - Purchase 100 lb(s), validate and receive picking (set lot 001) - Return the picking - Set the lot The quantity to do is 45.36 instead of 100. We make sure to convert the quant UoM (=Product UoM) into the appropriate UoM. opw-771930
This commit is contained in:
committed by
Goffin Simon
parent
6252c21000
commit
dfe96ff38e
@@ -572,8 +572,11 @@ class Picking(models.Model):
|
||||
'location_dest_id': mapping.location_dst_id,
|
||||
'product_uom_id': uom.id,
|
||||
'pack_lot_ids': [
|
||||
(0, 0, {'lot_id': lot, 'qty': 0.0, 'qty_todo': lots_grouped[mapping][lot]})
|
||||
for lot in lots_grouped.get(mapping, {}).keys()],
|
||||
(0, 0, {
|
||||
'lot_id': lot,
|
||||
'qty': 0.0,
|
||||
'qty_todo': mapping.product.uom_id._compute_quantity(lots_grouped[mapping][lot], uom)
|
||||
}) for lot in lots_grouped.get(mapping, {}).keys()],
|
||||
}
|
||||
product_id_to_vals.setdefault(mapping.product.id, list()).append(val_dict)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user