After a lot of research i finally solved my problem. I don't know if this is the best way of doing it but it works for me.
I added a THEME_field() function to my template.php of the desired field.
Inside my template function i removed the even/odd css classes because i want all in a single line.
Probably exists a better way to access field values, this was the solution i found. Digging the $item array i was able to get my code and color description values.
If someone knows a better way of doing this please help me improve it.
There goes the code i hope it helps someone else.
Don't forget to replace THEME by your theme name and the FIELDNAME.
function THEME_field__FIELDNAME($variables) {
$output = '';
// Render the label, if it's not hidden.
if (!$variables['label_hidden']) {
$output .= '<div class="field-label"' . $variables['title_attributes'] . '>' . $variables['label'] . ': </div>';
}
// Render the items.
$output .= '<div class="field-items"' . $variables['content_attributes'] . '>';
$codes = "";
$colors ="";
foreach ($variables['items'] as $delta => $item) {
$code = $item['field_color_description']['#object']->title_field['und'][0]['value'];
$color = $item['field_color_description']['#object']->field_color_description['und'][0]['node']->title;
$codes .= $code."/";
//avoid repeated color descriptions
if (strpos($colors,$color) === false)
{
$colors .= $color."/";
}
}
$classes = 'field-item even';
$codeAndColors = rtrim($codes,"/") . " ". rtrim($colors,"/");
$output .= '<div class="' . $classes . '"' . ' title="'. $codeAndColors.'" '. $variables['item_attributes'][$delta] . '>' . $codeAndColors . '</div>';
$output .= '</div>';
// Render the top-level DIV.
$output = '<div class="' . $variables['classes'] . '"' . $variables['attributes'] . '>' . $output . '</div>';
return $output;
}