Change list of values dynamically with a click I realize my request is a bit complex, I hope someone can answer.

I have a drupal 7 clean installation. I have a node type called Whole and another one called Piece. A Whole contains one to many Piece: I used the Entity module (with Entity reference) to link entities. The Piece node has a boolean field called selected.

When a user views a Whole node he can see all the Piece elements linked to it.

I need to allow an unlogged user to set the selected field of the piece node to true without leaving the Whole node page. I also need to keep track of the selected Piece elements (maybe in a session variable?). In the end I need to list all the Pieces altered in the session to compose a mail. When the mail is sent the session is cleared.

Is there a module that allows in place edit of node attributes?? I have installed and tried Editable Views, but it doesn't work. Maybe there is a conflict with my drupal version (7.14) which unfortunately I can't change.
You don't need to let anon visitors edit nodes to achieve this, and I wouldn't recommend it. It presents a security issue, and would store the "selected" status as a property of the node (for all visitors). 

Rather, you can store the selected nodes in a session or a cookie, using a standalone drupal form. Create a form, like so:

function YOURMODULE_node_store_form($form, &amp;$form_state, $nid) {
  $form_state['nid'] = $nid;
  $dv = (isset($_SESSION['node_store'] &amp;&amp; in_array($nid, $_SESSION['node_store']) ? 1 : NULL;
  $form['selected'] = array(
    '#type' =&gt; 'checkbox',
    '#title' =&gt; 'Include this page in email.',
    '#default_value' =&gt; $dv,
  );
  $form['actions']['submit'] = array(
    '#type' =&gt; 'submit',
    '#value' =&gt; 'Submit',
  );
  return $form;
}

function YOURMODULE_node_store_form_submit($form, $form_state) {
  if($form_state['values']['selected'] &amp;&amp; $form_state['nid']) {
    $_SESSION['node_store'][] = $form_state['nid'];
    drupal_set_message('The page will be included in the email.');
  }
}


In the template file for the Piece content type, add the form to the teaser display, like so:

&lt;?php print render(drupal_get_form(MYMODULE_node_store_form, $node-&gt;nid);) ?&gt;


To include the stored nodes in the mail, you can retrieve them from the $_SESSION['node_store'] array. Once the email has been sent, you should probably clear the $_SESSION['node_store'] array.

If you DO have to store it to the node, use the node_save function in your submit handler, instead:

function YOURMODULE_node_store_form_submit($form, $form_state) {
  if($form_state['values']['selected'] &amp;&amp; $node = node_load($form_state['nid'])) {
    $node-&gt;field_selected[$node-&gt;language][0]['value'] = 1;
    node_save($node);
    $_SESSION['node_store'][] = $node-&gt;nid;
    drupal_set_message('The page will be included in the email.');
  }
}