On Mar 18, 2010, at 10:01 PM, Adam Heath wrote: > Jacopo Cappellato wrote: >> On Mar 18, 2010, at 6:37 PM, Adam Heath wrote: >> >>>> It may be that your change isn't really needed. But I will admit I >>>> don't have a complete knowledge of everything. >>> OrderItemShipGroupAssoc? >> >> Is it a question for me? > > Maybe that's the entity that is actually used, meaning you wouldn't > need to do that change you did. >
This is very basic order data model information: OrderItemShipGroupAssoc is used to group together order items (OrderItem) into ship groups (OrderItemShipGroup): each ship groups share the same set of preferences (ship to address, shipment method, estimated delivery date etc...); they are created before the shipment. They represent the agreed upon shipment information. The same OrderItem could be associated to two (or more) different shipment groups, and this is the reason I have added the field to the pk of OrderShipment. OrderShipment is used, when a shipment is created to associate a shipment item to the (part of the) order item assigned to that shipment. Before my change, this entity was not used (apart from the "shipment plan" workflow) because the association was created and stored when ItemIssuance records were created i.e. when the items were issued from the warehouse and assigned to the shipment. But if you wanted to create shipment items before the items were issued you had to create OrderShipment records. Before my change, if an order item is split into two ship groups, OrderShipment was not able to tell you for what ship group the shipment items were for. Jacopo
