I have one customer who has the following requirements:
One invoice per order
Shipment to each store, typically about 15-30 locations / order
I usually deliver using carrier trytond-stock-package-shipping-mygls
I think the issue I am having is that the contact info (phone number) is not linked to an address, and for carrier phone number is essential to be able to reach the person responsible for reception.
I have attempted the following in order to send shipments to multiple locations:
Multiple addresses for customer party, one for each store. Problem is that I can not set the contact phone for the store. Maybe having a contact field on the shipment could solve this.
I can use manual shipment, and create multiple shipments until the sale quantity is depleted.
Have a party for each store/destination and select the shipment party in sale. This works only if I have one shipment / sale.
If I use manual shipment method, the “foreign” store party will not be matched.
Make separate sales for each store, and use invoice grouping.
At the moment I use the legacy carrier interface in order to create the labels, but it gets confusing to have some created by Tryton and some created using another interface.
In the case where I create a label in a different interface, I think it would be very useful to be able to edit the shipping reference, so that I can store the tracking number, but from what I can tell this field is read-only after packing.
For me you should use a sale for each store and using invoice grouping. Using an address for each store sounds lilke the simpler solution. Using shipment on order confirmation will be probably easier and in case you do not have enougth quantity a backorder will be created automatically.
If the orders are quite frequent (i.e: One or more orders per day), I will consider also adding sale_shipment_grouping to group prending backorders with new orders.
If you need to force the grouping by the customer order number, I will consider adding the following:
Make sale reference required for such customer and copy it to the invoice
Add invoice reference as grouping field. So orders from diferent order (i.e: different refernece) won’t be grouped.
This will force to always group by customer order.
Another option, which I’m not sure if its simpler is: Enter a single sale for the full customer order and then add a address field on each line. This way you can customize the _group_shipment_key function to create a shipment for each of the customer locations. The drawback is that you need to repeat for each line the address where it should be received.
I think this is the right solution, create one sale and multiple shipments to the sale party each with the right individual address linked to the contact, I will wait for 6.6.
Thank you for the detailed info, however I do not have any experience with sale invoice grouping in order to evaluate how helpful it could be, also I get the feeling that you are suggesting overriding some things using custom module.
I’m glad that address-contact grouping is coming to 6.6, thank you for the great work!
If you want to automate everything (which I will recomend) you will always need to override something in custom module. If you use a sale for each store you will need to override grouping methods and if you want ot just have a sale and create all the shipments automatically you will need to add the address for line and override the grouping key.
Both options are possible, you can pick the one that works better for your users and both are simple to implement as Tryton is tought to support them.