Steps to reproduce:
- Enable Storage locations
- Add two lots in stock:
- lot_shelf_2 in WH/Stock/Shelf 2
- lot_shelf_1 in WH/Stock/Shelf 1
- Enable the 'Closest Location' removal strategy on its product category
- Create a delivery using this product and mark it as todo
Issue:
lot_shelf_2 will be selected even though it should take the one from
Shelf 1.
When filtering on the location, we need to filter on the location name
instead of this is.
Also, when creating a new quant on a product using the 'closest'
location, the filter will create a traceback because it will try to
filter on a NewId.
closesodoo/odoo#140175
Signed-off-by: William Henrotin (whe) <whe@odoo.com>