[FIX] stock: unreserve picking with latest scheduled date
[FIX] stock: unreserve picking with latest scheduled date

- Create a product P with 10 units on hand
- Create a SO with 5 units, validate
- Create another SO with 5 units, validate
- Update the quantity on hand to 8

The picking linked to the first SO as 2 units unreserved, while one
would expect the unreservation on the second picking.

When unreserving, sort the move lines according to the picking scheduled
date. The latest schedule date comes first.

opw-2233331

closes odoo/odoo#49830

X-original-commit: 41c05cbfb015407dbbf7100233999ecd154267dc
Signed-off-by: Nicolas Martinelli (nim) <771435c469f83f6aa9c405ac5e1ed06314a94f2d@odoo.com>

ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo