I created a custom order status like below.
config.xml
<sales>
<order>
<statuses>
<backorders translate="label">
<label>Back Orders</label>
</backorders>
</statuses>
<states>
<backorders translate="label">
<label>Back Orders</label>
<statuses>
<backorders default="1"/>
</statuses>
</backorders>
</states>
</order>
</sales>
mysql script
<?php
$installer = $this;
$installer->startSetup();
// Required tables
$statusTable = $installer->getTable('sales/order_status');
$statusStateTable = $installer->getTable('sales/order_status_state');
// Insert statuses
$installer->getConnection()->insertArray(
$statusTable,
array('status', 'label'),
array(
array(
'status' => 'backorders',
'label' => 'Back Order'
)
)
);
// Insert states and mapping of statuses to states
$installer->getConnection()->insertArray(
$statusStateTable,
array('status', 'state', 'is_default'),
array(
array(
'status' => 'backorders',
'state' => 'backorders',
'is_default' => 1
)
)
);
$installer->endSetup();
During the back order the order status is saved to backorders and it will show in the admin panel order list. My question is the same order is not showing in the customers my account recent orders section.
Why this orders under status of backorders not showing in recent orders page?
In the admin panel if we create an invoice the order status is changed to Processing, but if i create an invoice for the orders wich belongs to backorders are not changed to Processing.But if i completed the shipping for backorders order it will change the order status to Completed
What is the issue causing this?
UPDATE : This is how i update the order status in the observer
$order->setData('state', 'backorders');
$order->setStatus('backorders');
$history = $order->addStatusHistoryComment('', false);
$history->setStatus('backorders')->setData('state', 'backorders')->setIsCustomerNotified(false);
$order->save();