title: How to apply the search function on a many2many field in Odoo?
body: <p>I have been working on developing modules in Odooo8. I have a  many2many field that is being filtered through the search function .The scenario is that the many2many field has widget="many2many_checkboxes", now I want to get all the records based on the checkbox selection. I tried this:     </p>
  
  <pre><code> ramdan_records = self.env['hr.contract'].search([('analytic_account_id','in', self.stable_id)])
  </code></pre>
  
  <p>On doing this got following error:</p>
  
  <pre><code>AssertionError: Invalid value account.analytic.account(1, 2, 3) in domain term 
  </code></pre>
  
  <p>I want to fetch all records matching the criteria. Can I have some guidance on this. Thanks n Regards</p>