Custom Detail View missing relationship subpanels

Custom view is not showing relationship sub panels.

I have created this view file:

custom/modules/CoMO_Orders/views/view.smalldetail.php

    <?php

require_once 'include/MVC/View/views/view.detail.php';

class CoMO_OrdersViewSmallDetail extends ViewDetail
{
    // function runs before view is disaplyed.
    public function preDisplay()
    {

        $metadataFile = "custom/modules/CoMO_Orders/metadata/smalldetailviewdefs.php";

        $this->dv = new DetailView2();
        $this->dv->ss = &$this->ss;
        $this->dv->setup($this->module, $this->bean, $metadataFile, get_custom_file_if_exists('include/DetailView/DetailView.tpl'), true, 'smalldetailviewdefs');
    }
}

when browsing to

index.php?module=CoMO_Orders&action=SmallDetail&record=c081ecc5-6648-2ce2-bc96-5f60805b94f8

I am getting the view i am expending with the correct metadata, but it is missing the subpannels. Below is the metadata file.

Any help would be great,

custom/modules/CoMO_Orders/metadata/smalldetailviewdefs.php

    <?php
$module_name = 'CoMO_Orders';
$viewdefs[$module_name] =
array(
    'DetailView' => array(
        'templateMeta' => array(
            'form' => array(
                'buttons' => array(0 => 'EDIT',
                    1 => 'DUPLICATE',
                    2 => 'DELETE',
                    3 => 'FIND_DUPLICATES',
                    4 => array('customCode' => '<input type="button" class="button" onClick="window.location.replace(\'index.php?entryPoint=emailorder&id={$fields.id.value}\');" value="Send Email">'),
                    5 => array('customCode' => '<input type="button" class="button" onClick="window.open(\'index.php?entryPoint=warehouseorder&id={$fields.id.value}\');" value="Warehouse">'),
                    6 => array('customCode' => '<input type="button" class="button" onClick="window.open(\'index.php?entryPoint=orderprint&id={$fields.id.value}\');" value="Print Copy">'),
                ),
            ),
            'maxColumns' => '2',
            'widths' => array(
                0 => array(
                    'label' => '10',
                    'field' => '30',
                ),
                1 => array(
                    'label' => '10',
                    'field' => '30',
                ),
            ),
            'useTabs' => false,
            'tabDefs' => array(
                'DEFAULT' => array(
                    'newTab' => false,
                    'panelDefault' => 'expanded',
                ),
                'LBL_DETAILVIEW_PANEL17' => array(
                    'newTab' => false,
                    'panelDefault' => 'expanded',
                ),
                'LBL_EDITVIEW_PANEL1' => array(
                    'newTab' => false,
                    'panelDefault' => 'expanded',
                ),
            ),
            'syncDetailEditViews' => true,
        ),
        'panels' => array(
            'default' => array(
                0 => array(
                    0 => 'name',
                    1 => 'date_entered',
                ),
                1 => array(
                    0 => array(
                        'name' => 'order_type',
                        'studio' => 'visible',
                        'label' => 'LBL_ORDER_TYPE',
                    ),
                    1 => array(
                        'name' => 'order_status',
                        'studio' => 'visible',
                        'label' => 'LBL_ORDER_STATUS',
                    ),
                ),
                2 => array(
                    0 => array(
                        'name' => 'deliver_to',
                        'studio' => 'visible',
                        'label' => 'LBL_DELIVER_TO',
                    ),
                ),
                3 => array(
                    0 => array(
                        'name' => 'delivery_address',
                        'label' => 'LBL_DELIVERY_ADDRESS',
                    ),
                ),
                4 => array(
                    0 => array(
                        'name' => 'date_sent',
                        'label' => 'LBL_DATE_SENT',
                    ),
                    1 => array(
                        'name' => 'ordernumber',
                        'label' => 'LBL_ORDERNUMBER',
                    ),
                ),
            ),
            'lbl_detailview_panel17' => array(
                0 => array(
                    0 => array(
                        'name' => 'como_orders_cases_name',
                        'label' => 'LBL_COMO_ORDERS_CASES_FROM_CASES_TITLE',
                    ),
                    1 => array(
                        'name' => 'como_orders_como_miscinv_name',
                        'label' => 'LBL_COMO_ORDERS_COMO_MISCINV_FROM_COMO_MISCINV_TITLE',
                    ),
                ),
            ),
            'lbl_editview_panel1' => array(
                0 => array(
                    0 => 'description',
                ),
            ),
        ),
    ),
);

I have changed this line to

$this->dv->setup($this->module, $this->bean, $metadataFile, get_custom_file_if_exists('include/DetailView/DetailView.tpl'));

As it doesn’t seem to affect anything and i have seen this else where on the forum