We run a script to send orders to the warehouse, it changes the order status to a custom status: sent_to_warehouse.
When we have to do a partial refund for an order, once the credit memo with the partial refund is saved, the order status gets switched from sent_to_warehouse back to processing, and so our script picks it up a second time, and resend is to the warehouse. It can result in double shipments.
How can I change the behavior of the credit memo save to just leave the status unchanged if it is a partial refund?
Thanks for your ideas. Using v1.6.1