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.
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.
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.
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.