diff --git a/base_user_role_company/README.rst b/base_user_role_company/README.rst index f59ad0ce1..184839e31 100644 --- a/base_user_role_company/README.rst +++ b/base_user_role_company/README.rst @@ -113,6 +113,10 @@ Contributors - Robin Conjour +`Dynapps `__ + + - Bert Van Groenendael + Maintainers ----------- diff --git a/base_user_role_company/models/user.py b/base_user_role_company/models/user.py index f050be474..38a84af6d 100644 --- a/base_user_role_company/models/user.py +++ b/base_user_role_company/models/user.py @@ -8,16 +8,16 @@ class ResUsers(models.Model): _inherit = "res.users" @classmethod - def authenticate(cls, db, login, password, user_agent_env): - uid = super().authenticate(db, login, password, user_agent_env) + def authenticate(cls, db, credential, user_agent_env): + auth_info = super().authenticate(db, credential, user_agent_env) # On login, ensure the proper roles are applied # The last Role applied may not be the correct one, # sonce the new session current company can be different with cls.pool.cursor() as cr: - env = api.Environment(cr, uid, {}) + env = api.Environment(cr, auth_info["uid"], {}) if env.user.role_line_ids: env.user.set_groups_from_roles() - return uid + return auth_info def _get_enabled_roles(self): res = super()._get_enabled_roles() diff --git a/base_user_role_company/readme/CONTRIBUTORS.md b/base_user_role_company/readme/CONTRIBUTORS.md index 8fa3c89a9..62de1987e 100644 --- a/base_user_role_company/readme/CONTRIBUTORS.md +++ b/base_user_role_company/readme/CONTRIBUTORS.md @@ -7,3 +7,7 @@ [WeSolved](http://wesolved.com) > - Robin Conjour \<\> + +[Dynapps](http://dynapps.eu) + +> - Bert Van Groenendael \<\> diff --git a/base_user_role_company/static/description/index.html b/base_user_role_company/static/description/index.html index f4b1b4fb6..836d5dc80 100644 --- a/base_user_role_company/static/description/index.html +++ b/base_user_role_company/static/description/index.html @@ -457,6 +457,12 @@

Contributors

  • Robin Conjour <rconjour@wesolved.com>
  • +

    Dynapps

    +
    + +