public function getMaintenanceModel($detailed = false, $action = 'index')
    {
        if (isset($this->_maintenanceModels[$action])) {
            return $this->_maintenanceModels[$action];
        }

        $model = $this->tracker->createTrackClass('Model\\FieldMaintenanceModel');

        if ($detailed) {
            if (('edit' === $action) || ('create' === $action)) {
                $model->applyEditSettings();

                if ('create' === $action) {
                    $model->set('gtf_id_track', 'default', $this->_trackId);

                    // Set the default round order

                    // Load last row
                    $row = $model->loadFirst(
                            array('gtf_id_track' => $this->_trackId),
                            array('gtf_id_order' => SORT_DESC),
                            false // Make sure this does not trigger type dependency
                            );

                    if ($row && isset($row['gtf_id_order'])) {
                        $newOrder = $row['gtf_id_order'] + 10;
                        $model->set('gtf_id_order', 'default', $newOrder);
                    }
                }
            } else {
                $model->applyDetailSettings();
            }

        } else {
            $model->applyBrowseSettings();
        }

        $this->_maintenanceModels[$action] = $model;

        return $model;
    }