mirror of
https://github.com/OCA/server-backend.git
synced 2025-02-18 09:52:42 +02:00
[10.0][UPD] base_user_role: Disabled Administrator user selection in notebook users line (#1170)
This commit is contained in:
committed by
Bert Van Groenendael
parent
495553d32d
commit
c3c88252de
@@ -119,6 +119,7 @@ Contributors
|
||||
* Sébastien Alix <sebastien.alix@osiell.com>
|
||||
* Duc, Dao Dong <duc.dd@komit-consulting.com> (https://komit-consulting.com)
|
||||
* Jean-Charles Drubay <jc@komit-consulting.com> (https://komit-consulting.com)
|
||||
* Antonio Russo <antonio.r@rwsdigital.com>
|
||||
|
||||
Do not contact contributors directly about support or help with technical issues.
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import datetime
|
||||
import logging
|
||||
|
||||
from odoo import api, fields, models
|
||||
from odoo import SUPERUSER_ID
|
||||
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
@@ -76,7 +77,8 @@ class ResUsersRoleLine(models.Model):
|
||||
comodel_name='res.users.role', string="Role",
|
||||
ondelete='cascade')
|
||||
user_id = fields.Many2one(
|
||||
comodel_name='res.users', string="User")
|
||||
comodel_name='res.users', string="User",
|
||||
domain=[('id', '!=', SUPERUSER_ID)])
|
||||
date_from = fields.Date("From")
|
||||
date_to = fields.Date("To")
|
||||
is_enabled = fields.Boolean("Enabled", compute='_compute_is_enabled')
|
||||
|
||||
Reference in New Issue
Block a user