title: How to get id as integer from on_change method?
body: <p>I want to select distinct values with an sql query, for that I need id as integer.  </p>
  
  <p>My code is:</p>
  
  <pre><code>@api.onchange('qty')
  def _on_change_name(self):
      logging.warning(self.id)
  </code></pre>
  
  <p>The printed id is <code>&lt;openerp.models.NewId object at 0x7fc37d880490&gt;</code></p>
  
  <p>How can I get integer from this <code>id</code> ?</p>