title: OpenERP How to make a button invisible on button click event
body: <p>In python, I have the following field:</p>
  
  <pre><code>'permit':fields.selection([('new', 'New'),
              ('applied', 'Applied'),
              ('received','Received')], 'Permit', select=True), 
  
  def apply_permit(self, cr, uid, ids, context=None):
          data = {'value': {'permit':'applied'}}
          return data
  </code></pre>
  
  <p>In XML, I have the following:</p>
  
  <pre><code> &lt;field name="permit" readonly="True"/&gt;
   &lt;button name="apply_permit" string="Apply" type="action" class="oe_highlight" attrs="{'invisible':[('permit','=','applied')]}" /&gt;
  </code></pre>
  
  <p>The attrs code above doesn't currently work but what I want to do is: when click on the button  'permit' field value will be set to 'applied' and then hide the button.All these done before the form save. The button is inside the form. </p>