title: How to execute query in Odoo-8 from Python?
body: <p>I have the following function in the class <code>hr_evaluation_interview</code>:</p>
  
  <pre><code>@api.onchange('evaluation_id')
  def onchange_evalID(self):
      self.deadline=self.env.cr.execute('SELECT date FROM hr_evaluation_evaluation where id=119')
  </code></pre>
  
  <p>Note: I'm just giving <code>id=119</code> in the query for testing purposes. </p>
  
  <p>When I give <code>self.deadline=datetime.now.strftime(%Y-%m-%d %H:%M:%S")</code> it works fine and changes the value of field <code>deadline</code> when the value of field <code>evaluation_id</code> changes. Again for just testing.</p>
  
  <p>What I really need is to execute a query similar to what I mentioned. However when I execute this query nothing is printing on the <code>deadline</code> field. When I check the log I see this warning:</p>
  
  <pre><code>WARNING db_name openerp.models: Cannot execute name_search, no _rec_name defined on hr_evaluation.evaluation
  </code></pre>
  
  <p>I tried checking online why this warning, but got no help. Am I doing something wrong? How exactly can I execute query from within <code>@api.onchange(self)</code>?</p>