Location as pallet/package

Continuing the discussion from Finer grain management for storage location:

Rational

With Finer grain management for storage location, it will be possible to use location as pallet/package because the number should no more be a problem.

Proposal

The user need to be able move them (change the parent location) inside the warehouse.
The user need to register the sent of a pallet to a customer or receive a pallet from a supplier.
The user must be able to create such new palette/package.

Implementation

As a pallet/package is a location, we need to distinct location that can move from those that can not. So a new Boolean is added to the location to allow to move it. It will be forbidden to change the parent of a location if it is not checked and if it has moves.
The move of a location is done using an internal shipment but it will require some improvements:

  • disable child_of domain on moves from shipment when the field is read-only
  • an assignation field must be added on location which will contain the shipment id from which the location is assigned for moving (this will ensure the serialization of assignation and prevent to change the parent)
  • a child_of constraint must be added on the locations moved but only for assignation
  • the StockSupply wizard must apply the forecast move of location (like the stock_forecast) when computing product_by_location

On ShipmentOut and ShipmentInReturn done, the empty movable location should be deactivated. The location can be deactivated if all moves using it are done or canceled and if the forecast quantity of products at max date in it is equals to 0.

The new stock group must allow to create a location with the Boolean checked. This will allow to create such location on ShipmentIn and ShipmentOutReturn.

Patches

I’m not sure to correctly understand this. The pallet package will be the Storage Unit that you talk about on Finer grain management for storage location ??

On which types it will be possible to mark the location as movable? I’m wondering if it’s not worth to add a new location type instead of a Boolean. This will prevent to select movable locations as target or source locations and only use them on Storage Units.

No, it is location.

Only storage.

I do not see the benefit. Indeed I just see drawback because every location domain will need to be adapted.

But we want to be able to use movable location as target and source of moves otherwise it is not possible to fill them.

And how the pallets/pacakges will be moved? How the user will select the pallets that will be used on a Shipment?

Also it must be possible to create new pallets on production output.

By internal shipment see:

Yes but how?

Currently it’s only possible to move stock.moves. So how will the user indicate that it’s moving a location?

By selecting the location.

Can you please be more verbose?

Currently the shipment internal ask a source location, a target location and a list of moves to move.
So I do not see how the location will be moved using those fields.

The selected movable locations on the shipment will be moved to the target location.

I think this will be ambiguous for the user because he may think that he is shipping the location (like for Internal).
Instead I think we could simply deactivate movable locations used that are empty when the shipment is done.