title: Openerp Key error throwing when one2many field in one calss calling in as a related field in another
body: <p>I have another issue , please help me again. 
  I have this four class named "Department, Division,Section" like bellow</p>
  
  <p>Department</p>
  
  <pre><code>    class dept_new_registration(osv.osv):
      _name = "hr.dept.n.registration"
      _description = "depts"
      _columns = {
          'name': fields.char('Dept Name', size=128, required=True),
          'company_id': fields.many2one('res.company', 'Company Name', required=True),
          'divisions': fields.one2many('hr.division.n.registration', 'dept_id', 'Division'),
          'resres':fields.one2many('res.users','alias_id')
  #   'deptdept':field.integer('For Dept Ref'),
      }
  
  dept_new_registration()
  </code></pre>
  
  <p>Division</p>
  
  <pre><code>class division_new_registration(osv.osv):
      _name = "hr.division.n.registration"
      _description = "Divisions"
      _columns = {
          'name': fields.char('Division Name', size=128, ),
          'dept_id': fields.many2one('hr.dept.n.registration', 'Dept. Name', select=True, required=True),
          'sections': fields.one2many('hr.section.n.registration', 'section_id', 'Section'),
  #   'dividivi':fields.integer('For Division Ref'),
      }
  
  division_new_registration()
  </code></pre>
  
  <p>Section</p>
  
  <pre><code>class section_new_registration(osv.osv):
      def create(self, cr, uid, values, context=None):
          vals = {}
          divi_id = self.pool.get('hr.division.n.registration').browse(cr,uid, values['section_id']).id
          divi_name = self.pool.get('hr.division.n.registration').browse(cr,uid, divi_id).name
  
          dept_id = self.pool.get('hr.division.n.registration').browse(cr,uid, values['section_id']).dept_id.id
          dept_name = self.pool.get('hr.dept.n.registration').browse(cr,uid, dept_id).name
  
  
          name = str(dept_name) + '/' +str(divi_name) + '/' + str(values['section_name'])
          values.update({'name': name})
  
          return super(section_new_registration, self).create(cr, uid, values, context=context)
  
  
      _name = "hr.section.n.registration"
      _description = "sections"
      _columns = {
          'name': fields.char('Name', size=128), 
          'complete_name':fields.char('New Loacation'),       
          'section_name': fields.char('Section Name', size=128, required=True),
          'section_id': fields.many2one('hr.division.n.registration', 'Division Name', select=True, required=True),
          'test_id':fields.integer('Test'),
  
  
      }
  
  section_new_registration()
  </code></pre>
  
  <p>I have linked all four of them successfully in <strong>hr_department</strong> table and that store the values for create the company structure.
  in <strong>hr_department</strong> ,</p>
  
  <pre><code>_columns = {
     'name': fields.char('Segment Name', size=64, required=True, ),
     'complete_name': fields.char('Complete Name'),
      'parent_id': fields.many2one('hr.department', 'Parent Segment', select=True),
      'child_ids': fields.one2many('hr.department', 'parent_id', 'Child Departments'),
      'note': fields.text('Employment Remarks'),
  
      'company_id': fields.many2one('res.company', 'Company', select=True, required=False),
  
      'section_id':fields.many2one('hr.section.n.registration','Section'),
  
      'devision_id':fields.related('section_id','section_id', type="many2one", relation='hr.division.n.registration',string='Devision', store=True),
      'depart_id':fields.related('devision_id', 'dept_id',  type="many2one", relation='hr.dept.n.registration',string='Department', store=True),
  
  
  }
  </code></pre>
  
  <p>What I need is , I need to call all these four columns in <strong>hr_employee</strong> table as it is and when I call that like bellow, it throws a keyError each and every time. please help me with this,
  in <strong>hr_employee</strong></p>
  
  <pre><code>'sec_id': fields.related('department_id', 'section_id', type="many2one", relation='hr.department',string='Section',store=True),
       'division_id':fields.related('department_id','devision_id', type="many2one", relation='hr.department', string='Division', store=True),
       'departmnt_id':fields.related('department_id', 'depart_id',  type="many2one", relation='hr.department',string='Department', store=True),
       'comp_id': fields.related('department_id', 'company_id', type="many2one", relation='hr.department',string='Company',store=True),
  </code></pre>
  
  <p>Please help me with this and thank you so much in advance</p>