Finding empty locations

Hi,

We have a big warehouse with a lot of locations to store a pallet at each location.
When doing a supplier shipment, the user has to choose the location where he will store the products.
Until now, he is searching (visually) in the warehouse for an empty location to put the pallet from the supplier shipment. Wondering in Tryton, how to get a list of empty locations for helping user?

There is a get_empty_location function on the location but I guess you want to be able to filter out the ones that are not empty.

In such case I’m wondering if it won’t be better that tryton picks the first location that is empty (you can define an order) and propose them to the user.

This will be similar to what Stock product location module does but just filtering empty locations.

1 Like

I need all empty storage locations from a warehouse

Indeed the warehouse domain is already applied by the shipment, so you just need to add a domain for the empty warehouse clause. But I’m not sure if that is easy to implement.

That’s why I sugested that the server sugests the location which will be probably easier to implement.

I’m afraid that there will be not performent way to get this information. The get_empty_location may be slow when performed on a lot of locations. Also I guess in your use case it should not considered as empty a location with consumable.

At some point I think we will need a simpler sub-level than location to build a fast WMS on top of it.

If I’m not mistaken, currently the system is forced to look if a movement placed stock on the location to define if the location is empty. And so to check a lot of location, there is going to be a performance issue.

For the moment, I use the “Create Inventories” wizard to generate inventories of all locations. Duration +/- 30sec for 1000 locations.
Then I create a CSV report with location,Product,Lot,Actual Quantity.
I remove the lines with a product from the list → and I have the list of empty locations.
And I delete the inventories I just created.