title: Change button's action dynamically
body: <p>Can a button's action be changed dynamically depending on another field's value? Example code:</p>
  
  <pre><code>&lt;xpath expr="//button[@class='oe_stat_button o_res_partner_tip_opp']" position="attributes"&gt;
      &lt;attribute name="name"&gt;%(action1)d&lt;/attribute&gt;
      &lt;attribute name="name"&gt;%(action2)d&lt;/attribute&gt;
  &lt;/xpath&gt;
  </code></pre>
  
  <p>That button's action would be action1 or action2 depending on, let's say, a boolean/select/whatever field's value. How can this be achieved?</p>