Skip to content

Commit

Permalink
Merge PR #237 into 15.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 fbefe1f + 0fa8a75 commit db35036
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 db35036

Please sign in to comment.