title: Odoo 9 unable to save id from many2one model
body: <p>I'm currently building a module like a project module which shows Kanban view for model 'test.project' and when I click Kanban view, It shows tree views for model 'test.task' related to 'test.project'.</p>
  
  <p>So I made a code below</p>
  
  <pre><code>class Test_project(osv.osv):
  
      _name = "test.project"
      _columns = {
          'name': fields.char('Name'),
          'task_ids': fields.one2many('test.task', 'project_id', string='TASK')
      }
  
  class Test_Task(osv.osv):
  
      _name = 'test.task'
      _columns = {
          'project_id': fields.many2one('test.project', string='Project ID', required=1),
      }
  </code></pre>
  
  <p>When I saved a data for 'test.project', It is saved correctly, But When I saved a data for 'test.task', It shows an error which is </p>
  
  <pre><code>IntegrityError: null value in column "project_id" violates not-null constraint
  </code></pre>
  
  <p>Cannot get the id.</p>