For an order, when an invoice is created the order status changes to processing. Now, if a shipment is created the order status changes to Complete.
On debugging the code.. I have been able to find out the place where shipment save occurs.
Below is the file path: app\code\core\Mage\Adminhtml\controllers\Sales\Order\ShipmentController.php
In the following function:
protected function _saveShipment($shipment)
{
$shipment->getOrder()->setIsInProcess(true);
$transactionSave = Mage::getModel('core/resource_transaction')
->addObject($shipment)
->addObject($shipment->getOrder())
->save();
return $this;
}
I tried debugging the shipment variable data, but the status values show up as processing. But after the _saveShipment function is executed the order status changes to Complete
Could anyone tell me at what point the order status changes to Complete.