title: Odoo - Changing user group id just right after signup (ecommerce)
body: <p>I'm using Odoo 10. After a new user sign up (through localhost:8069/web/signup) i want him to be automatically allocated inside a group i created on my very own custom module (the user will need authentication from an admin later on so he can be converted to a regular portal user; after signup he will receive restricted access).</p>
  
  <p>I have tried many things. My latest effort looks like this:</p>
  
  <pre><code>class RestrictAccessOnSignup(auth_signup_controller.AuthSignupHome):
  
        def do_signup(self, *args):
          super(RestrictAccessOnSignup, self).do_signup(*args)
          request.env['res.groups'].sudo().write({'groups_id': 'group_unuser'})
  </code></pre>
  
  <p>Note that I have <code>import odoo.addons.auth_signup.controllers.main as auth_signup_controller</code> so that I can override the auth_signup controller.</p>
  
  <p>I have located that method as the responsible for doing the signup. So I call it in my new method and then try to change the newly created user's group_id.</p>
  
  <p>What i miss is a fundamental understanding of how to overwrite a field's value from another model inside a controller method context. I'm using the 'request' object although i'm not sure of it. I have seen people using 'self.pool['res.users'] (e.g.) for such purposes but i don't understand how to apply it inside my problem's context.</p>
  
  <p>I believe, also, that there is a way to change the default group for a user after it is created (i would like to know), but i also want to understand how to solve the general problem (accessing and overwriting a field's value from another module).</p>
  
  <p>Another weird thing is that the field groups_id does exist in 'res.users' model, but it does not appear as a column in my pgAdmin interface when i click to see the 'res.users' table... Any idea why?</p>
  
  <p>Thanks a lot!</p>