Skip to content
Snippets Groups Projects
Commit ae7db9c3 authored by Benjami's avatar Benjami
Browse files

wip :construction: : Add internal user role when creates an admin

parent ca2872d8
No related branches found
No related tags found
No related merge requests found
Pipeline #33881 passed
......@@ -211,3 +211,13 @@ class ResUsers(models.Model):
raise exceptions.UserError(
_('Something went wrong. Mail can not be sended. More details: {}').format(response.json())
)
def make_internal_user(self):
# TODO: Require rebase new roles branch
pass
# self.env["res.users.role.line"].sudo().create({
# "user_id": self.id,
# "active": True,
# "role_id": role.id,
# "company_id": self.id,
# })
\ No newline at end of file
......@@ -34,6 +34,7 @@ class AssignAdminWizard(models.TransientModel):
company = self.env['res.company'].browse(company_id)
company.add_ce_admin(user)
user.make_internal_user()
return True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment