Rational
In some warehouses there may be more than one place to ship. For example there can be multiple loading bay for trucks or different teams.
Usually in such case, the selection of the shipping point for a shipment is determined by default based on a rule system which use different criteria like the content (aka the products), the destination address, the volume or weight etc.
Proposal
A new module is created stock_shipping_point.
A new model stock.shipping.point is defined with a name and warehouse.
A rule engine is constructed as stock.shipping.point.selection (similar to carrier.selection) per warehouse with as criteria:
delivery_countrycontains_product_categories: a list of product categories that match if any product has one of these categoriescarriers(ifcarriermodule is activated)min_weightandmax_weight(if thestock_shipment_measurementsis activated)min_volumeandmax_volume(if thestock_shipment_measurementsis activated)
A field shipping_point is added to stock.shipment.out, stock.shipment.in.return which is filled by the rule engine on the waiting transition (if empty).
It is also added on stock.shipment.in and stock.shipment.out.return but not assigned.
On the stock.shipment.internal with transit, two fields are added outgoing_shipping_point and incoming_shipping_point with the outgoing_shipping_point being filled by the rule engine on waiting.
On the user a shipping_point field is added in relation with the warehouse which is used (if filled) to filter the shipments for the selected shipping_point.