Browse Source

Make user_id and role_id required in base_user_role_line

14.0
Pierrick Brun 6 years ago
committed by Jesús Alan Ramos Rodríguez
parent
commit
9b5fa560e3
  1. 6
      base_user_role/models/role.py

6
base_user_role/models/role.py

@ -74,11 +74,11 @@ class ResUsersRoleLine(models.Model):
_description = 'Users associated to a role'
role_id = fields.Many2one(
comodel_name='res.users.role', string="Role",
comodel_name='res.users.role', required=True, string="Role",
ondelete='cascade')
user_id = fields.Many2one(
comodel_name='res.users', string="User",
domain=[('id', '!=', SUPERUSER_ID)])
comodel_name='res.users', required=True, string="User",
domain=[('id', '!=', SUPERUSER_ID)], ondelete='cascade')
date_from = fields.Date("From")
date_to = fields.Date("To")
is_enabled = fields.Boolean("Enabled", compute='_compute_is_enabled')

Loading…
Cancel
Save