Browse Source

[10.0][UPD] base_user_role: Disabled Administrator user selection in notebook users line (#1170)

14.0
_tux 7 years ago
committed by Jesús Alan Ramos Rodríguez
parent
commit
b37fdd8ffb
  1. 1
      base_user_role/README.rst
  2. 4
      base_user_role/models/role.py

1
base_user_role/README.rst

@ -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
base_user_role/models/role.py

@ -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')

Loading…
Cancel
Save