title: openerp7 module conversion for odoo8
body: <p>I'm not a programmer so I would really appreciate if anyone could correct the code for a module to work in odoo 8 that was built for openerp 6.1 &amp; 7
  The module should retrieve the incoterms from suppliers and display them on the purchase order.</p>
  
  <p>Here is the code of the module.py:</p>
  
  <pre><code>import time
  
  from openerp.osv import fields, osv
  
  class res_partner(osv.osv):
      _inherit = 'res.partner'
      _columns = {
          'incoterm_id': fields.many2one(
                  'stock.incoterms',
                  'Incoterms',
                  help="Incoterm which stands for 'International Commercial"
                       "terms' implies its a series of sales terms which are"
                       "used in the commercial transaction."
                  ),
          }
  res_partner()
  
  class purchase_order(osv.osv):
      _inherit = 'purchase.order'
      _columns = {
          'incoterm_id': fields.many2one(
                  'stock.incoterms',
                  'Incoterms',
                  help="Incoterm which stands for 'International Commercial"
                       "terms' implies its a series of sales terms which are"
                       "used in the commercial transaction."
                  ),
          }
      def onchange_partner_id(self, cr, uid, ids, part):
          res = super(purchase_order,self).onchange_partner_id(cr, uid, ids, part)
          if not part:
              return res
          part = self.pool.get('res.partner').browse(cr, uid, part)
          res['value'].update({'incoterm_id':part.incoterm_id.id or False})
          return res
  purchase_order()`
  </code></pre>
  
  <p>This is the error message I get in odoo 8:</p>
  
  <pre><code>Traceback (most recent call last):
    File "/opt/odoo/openerp/http.py", line 500, in _handle_exception
  return super(JsonRequest, self)._handle_exception(exception)
    File "/opt/odoo/openerp/http.py", line 517, in dispatch
  result = self._call_function(**self.params)
    File "/opt/odoo/openerp/http.py", line 283, in _call_function
  return checked_call(self.db, *args, **kwargs)
    File "/opt/odoo/openerp/service/model.py", line 113, in wrapper
  return f(dbname, *args, **kwargs)
    File "/opt/odoo/openerp/http.py", line 280, in checked_call
  return self.endpoint(*a, **kw)
    File "/opt/odoo/openerp/http.py", line 733, in __call__
  return self.method(*args, **kw)
    File "/opt/odoo/openerp/http.py", line 376, in response_wrap
  response = f(*args, **kw)
    File "/opt/odoo/addons/web/controllers/main.py", line 948, in call_kw
  return self._call_kw(model, method, args, kwargs)
    File "/opt/odoo/addons/web/controllers/main.py", line 940, in _call_kw
  return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
    File "/opt/odoo/openerp/api.py", line 237, in wrapper
  return old_api(self, *args, **kwargs)
    File "/opt/odoo/openerp/api.py", line 360, in old_api
  result = method(recs, *args, **kwargs)
    File "/opt/odoo/openerp/models.py", line 5727, in onchange
  record._onchange_eval(name, field_onchange[name], result)
    File "/opt/odoo/openerp/models.py", line 5661, in _onchange_eval
  method_res = getattr(self._model, method)(*args)
    File "/opt/odoo/openerp/api.py", line 237, in wrapper
  return old_api(self, *args, **kwargs)
    File "/opt/odoo/addons/warning/warning.py", line 101, in onchange_partner_id
  result =  super(purchase_order, self).onchange_partner_id(cr, uid, ids, part, context=context)
    File "/opt/odoo/openerp/api.py", line 237, in wrapper
  return old_api(self, *args, **kwargs)
  TypeError: onchange_partner_id() got an unexpected keyword argument 'context'
  </code></pre>