Switching warehouse on a draft supplier shipment

Hi,

We sometimes met a problem about the warehouse on the supplier shipment.

Indeed, we order a lot of products in China and it can take some time until order is received in our warehouse. Meanwhile, we could receive another orders and it happens sometime that warehouse is full.
So we want to switch Warehouse on the supplier shipment to another warehouse but field is become readonly because of incoming moves. Solution would be to delete all moves and then update warehouse.

But, in our case, we already defined the incoming moves following the packing list received from the supplier and we create lots and split some quantities… so there could be many of move lines and recreating them would take a lot of time.

So, we’ve created a wizard that allow to update the warehouse on a draft supplier shipment and that update the “to_location” according the selected warehouse on the incoming moves.

Do you face the same problem?

Do you think this functionality could be included in Tryton ? (like “update header” button in sale or purchase)

1 Like

Why not amend the purchase to change the warehouse?

There may be a problem with account_tax_rule_country where the warehouse country and subdivision are used to set the taxes (see Changing warehouse with amendment with taxe rules based on country (#12326) · Issues · Tryton / Tryton · GitLab)

Stock moves are deleted. Supplier shipment is kept with previous warehouse. So you have to do again the work on the incoming moves (splitting, setting lots, …).

Indeed, i didn’t think about Tax. In our case, we switch for a Warehouse in the same area (and then same country too).

I guess we could have in standard such wizard as long as if the account_tax_rule_country is activated, it warns about changing warehouse with different country and subdivision.
Such wizard could be generic and works for supplier and customer shipments.

1 Like

Then probably the split wizard can be reused by just adding a warehouse field to decide the warehouse for the new moves.

We’ve implemented that as customization for spliting customer shipments in one of our deployments.

Hum, not sure to understand. In our case, our moves are already split and a lot is assigned for each move.
How would you update with the wizard, doing a split of 1 and updating the warehouse ?
Split button is not on Supplier Shipment.

Yes, the split wizard is only on customer shipments, which was our use case. But as

I’m wondering if it makes sense to resue the existing wizard (and make it available for supplier shipments also) instead of creating a new one.

If you split a shipment and select all the moves, select the new warehouse and you have changed the warehouse of the shipment :wink:

Yes, could be done this way. So this feature will be linked to the stock_split module and split action will be no more just ‘split’ but ‘split or update warehouse’.

I’ve started the code with a new wizard. I’ll halt now, waiting for the way it should be implemented (added on split wizard or a new wizard).

I do no like to merge two different needs into one wizard.

But on a second thought, I’m wondering if it really makes sense to change the warehouse on the shipment (instead of using the amendment).

For the supplier case, the supplier had receive an address to delivery the goods which is the warehouse address. So if you change it, you must inform the supplier because he has to deliver somewhere else. So an amendment seems to be the right thing.
If the the 2 warehouses are at the same address, I think they should be only one warehouse divided.

For the customer case, I think it is more about having the proper warehouse defined on the sale line so the shipment has the correct warehouse from the beginning. This would prevent the need to amend the sale to change the warehouse.

As I said, in case of amendment, all the work done on the draft shipment (split, lots assigning, …) is lost. In our case, the supplier doesn’t care of this change of warehouse (he must deliver by boat to Anvers). Then we take in charge the carrier to deliver to the warehouse. By default, it’s our warehouse but as I said, sometimes our warehouse is full and then we need to ship the goods to another warehouse (having another address near our warehouse) that we rent.

I just suggest our problem to the community. If nobody met the same problem, let’s keep the amendment to update the warehouse and on our side, we’ll use our custom wizard to update the warehouse :slight_smile:

For me it is strange that you already have the shipment created but did not receive the goods.
Also in some way you have to tell that the delivery address has changed, maybe not to the supplier but at least to the carrier. So for me amendment is still the best option.

We receive the packing list by email as soon the shipment is on the boat. It take approximatively 1 month to arrive in Belgium. During this time, we prepare the shipment reception following the packing list (split quantities, lot creation). One packing may result of more than 50 lines of incoming moves.

Indeed we have to tell to the carrier that the warehouse has changed.