title: How to create dynamic selection field base on condition?
body: <p>I'm learning to develop something with ODOO 11CE.
     I'd like to filling the "filelds.Selection" with the condition.</p>
  
  <p>So for example: 
         If I change the stage of CRM lead the x_status select field will also change. </p>
  
  <p>Here is my tried, But I does not working. </p>
  
  <p>class MYLead(models.Model):
      _inherit = ['crm.lead']</p>
  
  <pre><code>def _get_status_list(self):
      vals = []
      for rec in self:
          #New
          if rec.stage_id == 1:
              vals.extend([('0', 'Pending'), ('1', 'Ready')])
          #Qualified 
          elif rec.stage_id == 2:
              vals.extend([('0', 'Pending'), ('1', 'Waiting])
          #Proposition    
          elif rec.stage_id == 3:    
          else:
              vals.extend([('0', 'Processing'), ('1', 'Approve'), ('2', 'Pending'), ('-1', 'Reject')])
      return vals             
  
  x_status = fields.Selection(selection=_get_status_list, string='Status')
  </code></pre>