This may be a pretty basic question, but I can't seem to find any solution for it. I have an order with two products, but I only have one of them in stock. So I invoice and ship the product I have, but the status of the order remains as "Processing". I'm not gonna get the other product back in stock, so what can i do to make the order "complete" after invoicing the product i have in stock?
It seems you need to partially invoce and partially return the order. Most of the payment methods have this options disabled by default, so you will have to code your way out of this.
Check the payment method you are using and open the Model.
There you will see $_canCapturePartial and $_canRefundInvoicePartial. You have to set those to true to be able to partially refund an order and be able to mark it as complete after. More info in this question.