Browse Source

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

pull/1288/head
_tux 7 years ago
committed by Jairo Llopis
parent
commit
391313dc63
  1. 1
      base_user_role/README.rst
  2. 2
      base_user_role/__manifest__.py
  3. 3
      base_user_role/models/role.py

1
base_user_role/README.rst

@ -68,6 +68,7 @@ Contributors
------------
* Sébastien Alix <sebastien.alix@osiell.com>
* Antonio Russo <antonio.r@rwsdigital.com>
Maintainer
----------

2
base_user_role/__manifest__.py

@ -4,7 +4,7 @@
{
'name': 'User roles',
'version': '10.0.1.0.1',
'version': '10.0.1.0.2',
'category': 'Tools',
'author': 'ABF OSIELL, Odoo Community Association (OCA)',
'license': 'AGPL-3',

3
base_user_role/models/role.py

@ -6,6 +6,7 @@ import datetime
import logging
from odoo import api, fields, models
from odoo import SUPERUSER_ID
_logger = logging.getLogger(__name__)
@ -66,7 +67,7 @@ class ResUsersRoleLine(models.Model):
role_id = fields.Many2one(
'res.users.role', string=u"Role", ondelete='cascade')
user_id = fields.Many2one(
'res.users', string=u"User")
'res.users', string=u"User", domain=[('id', '!=', SUPERUSER_ID)])
date_from = fields.Date(u"From")
date_to = fields.Date(u"To")
is_enabled = fields.Boolean(u"Enabled", compute='_compute_is_enabled')

Loading…
Cancel
Save