This question has been flagged

I'm building an interface that requires that I specify warehouses and line items for deliveries. A single sale order might have multiple deliveries from different warehouses in order to meet the sale order.

I'm trying to find a way to conditionally prevent the automatic creation of delivery orders when a sale order is confirmed. I know I can disable it all-together, but that then prevents sales orders created outside of the interface from working the way we want.

I'm not sure of what I need to override in order to confirm the sale order without creating the delivery order. I've tried following some of the logic through, but it gets pretty convoluted pretty quickly.

Any ideas?

Avatar
Discard
Author

I'm also trying now to set route_id on sale_order_line in order to generate multiple delivery orders when the order is confirmed. I've done multiple tests with a sale_order with two sale_order_lines with routes that are for outbound deliveries for two different warehouses. However, confirming the order seems the completely ignore what'sat sale_order_line and creates a single delivery order from a completely different warehouse (the one on the sale_order). It's not possible to NOT have a warehouse_id for a sale_order, so the answer isn't to not have one on sale_order in the hope that sale_order_line will determine delivery orders.
I must be missing part of the puzzle here. What's the point of having route_id on sale_order_line if it's ignored?