title: AttributeError: 'bool' object has no attribute 'id'
body: <p>I want to ask. The error I get when I do a query to the database</p>
  
  <pre><code>def onchange_dept_from(self, cr, uid, ids, partner):
      print partner
      if partner != False:
          # note
          cr.execute('select z.name, z.id from res_partner x, account_account z where x.property_deposit_receivable = z.id AND x.id=%s',(partner,)),
          temp = cr.fetchone()
          name = temp and temp[0] or None
  
          cr.execute('select z.name, z.id from res_partner x, account_account z where x.property_deposit_payable = z.id AND x.id=%s',(partner,)),
          ads = cr.fetchone()
          name2 = ads and ads[0] or None
  
          val = {
              'dept_from':name,
              'dept_to':name2,
          }
          return {'value':val }
  </code></pre>
  
  <p>the possibility of "id" that clash came from the function that I use to move into account.move</p>
  
  <pre><code>def get_move_line(self, cr, uid, deposit, type, context=None):
      return {
              'type': type,
              'name': deposit.name or 'add',
              'debit': type == 'dest' and deposit.amount or 0.0,
              'credit': type == 'src' and deposit.amount or 0.0,
              'account_id': type == 'src' and deposit.dept_from.id or deposit.dept_to.id,
              'date': deposit.date,
              'deposit_id': deposit.id
      }
  </code></pre>
  
  <p>I think probably because at the time I had to query string, while the function get_move. I am looking for an integer. What should I do? I am out of ideas. please help me</p>