function canCreateItem()
{
// From Ticket Document Tab => check right to add followup.
if (isset($this->fields['tickets_id']) && $this->fields['tickets_id'] > 0) {
$ticket = new Ticket();
if ($ticket->getFromDB($this->fields['tickets_id'])) {
return $ticket->canAddFollowups();
}
}
if (Session::haveRight('document', 'w')) {
return parent::canCreateItem();
}
return false;
}