title: Population of a selection box base on the Other Selection Box
body: <p>Good Day! I have a problem I am trying to populate a Selection box base on the selected data on the other selection box here is my code</p>
  
  <p>.py</p>
  
  <pre><code>licensetype = fields.Many2one('hr.licensetype','License Type')
  license = fields.Many2one('hr.license','License')
  
  @api.one
  @api.onchange('licensetype')
  def getlicense(self):
      if len(self.licensetype) &gt; 0:
          mdlLicense= self.env['hr.license'].search([('license_name', '=', int(self.licensetype[0]))])
          #raise Warning(mdlLicense.ids)
          self.license = mdlLicense.ids
  </code></pre>
  
  <p>but still it populate all license I want to populate the License based on the selected License type. This is in Odoo8</p>