Skip to content

Commit

Permalink
Merge PR #238 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by legalsylvain
  • Loading branch information
OCA-git-bot committed Sep 11, 2023
2 parents 17b2f08 + 44f99b7 commit 25148da
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion base_user_role/models/role.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import datetime
import logging

from odoo import SUPERUSER_ID, api, fields, models
from odoo import SUPERUSER_ID, _, api, fields, models

_logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -103,6 +103,11 @@ def unlink(self):
users.set_groups_from_roles(force=True)
return res

def copy(self, default=None):
self.ensure_one()
default = dict(default or {}, name=_("%s (copy)", self.name))
return super().copy(default)

def update_users(self):
"""Update all the users concerned by the roles identified by `ids`."""
users = self.mapped("user_ids")
Expand Down

0 comments on commit 25148da

Please sign in to comment.