title: How to filter many2one res.parner field in odoo
body: <p>I have  </p>
  
  <pre><code>x_trainer_id = fields.Many2one('res.partner', string='Trainer')
  </code></pre>
  
  <p>field, and I want to filter data in it by the value that is put in <code>category_id</code> tag field in <code>partner form</code>. </p>
  
  <p>I want to show just those records in it their <code>category_id</code> tag value is defined Trainer.</p>