I am using magento 1.9 . as we know magento mark order state to complete once payment is received and shipment is created. i want to make completed state independent. like no matter payment is received and shipment is created i dont want magento to change the state to completed automatically. i just want the state to be as it was before creating shipment.
Looking in the core source, it looks like the native behavior you described comes from the method
_checkState (essentially called in the
_beforeSave method of an order) that you can find in
So, you should rewrite the model
Mage_Sales_Model_Order and modify the method
_checkState : remove for example the part
$this->_setState(self::STATE_COMPLETE, true, '', $userNotification);.