title: How to use a global variable to update a selection field with Odoo 10?
body: <p>Hi is it possible to have a global variable which gets updated based on 'onchange' and assign the same to a selection field?</p>
  
  <pre><code>variable = []
  
  class a:
      @api.onchange('some_other_filed')
      def function1(self):
          global variable
          variable = #something based on some other filed
  
      test = fields.Selection(variable)
  </code></pre>
  
  <p>Will this onchange reflect in selection field. All I get is empty list in selection field.</p>