title: related user linking with user and employee in odoo 9 in coustom module?
body: <p>I created a custom module for automatic user creation while an employee was created.It work properly but  the link between user and employee not yet created (related user not yet created)</p>
  
  <p><a href="https://i.stack.imgur.com/Gi5qV.png" rel="nofollow noreferrer">related user not linking with user</a></p>
  
  <p><a href="https://i.stack.imgur.com/PgrFo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PgrFo.png" alt="enter image description here"></a></p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;record id="view_users_form_inherit" model="ir.ui.view"&gt;
      &lt;field name="name"&gt;hr.employee.form&lt;/field&gt;
      &lt;field name="model"&gt;hr.employee&lt;/field&gt;
      &lt;field name="inherit_id" ref="hr.view_employee_form"/&gt;
      &lt;field name="arch" type="xml"&gt;
          &lt;xpath expr="//notebook" position="inside"&gt;
  
                  &lt;field name="employee_id" readonly="1" required="0" groups="base.group_no_one"
  
                                  attrs="{'invisible': [('parent_id', '=', False)]}"/&gt;
  
          &lt;/xpath&gt;
      &lt;/field&gt;
  &lt;/record&gt;
  </code></pre>
  
  <pre class="lang-py prettyprint-override"><code>@api.model
  def create(self, vals):
      result = super(ResUsersInherit, self).create(vals)
      print vals
      result['employee_id'] = self.env['res.users'].create({'name': vals['name'],'login': vals['work_email']})
  
      return result
  </code></pre>