[FIX] base: prevent App Switcher action to be selected as home action on user

Before this commit, one could choose the App Switcher as his Home action.
and arriving on /web would trigger an infinite loop at startup

After this commit it is not possible to choose the App Switcher as Home action anymore

OPW 800323
This commit is contained in:
Lucas Perais (lpe)
2017-12-20 15:08:53 +01:00
parent 8b69b2f732
commit 1ffe85f1cb
+1 -1
View File
@@ -201,7 +201,7 @@ class Users(models.Model):
signature = fields.Html()
active = fields.Boolean(default=True)
action_id = fields.Many2one('ir.actions.actions', string='Home Action',
help="If specified, this action will be opened at log on for this user, in addition to the standard menu.")
help="If specified, this action will be opened at log on for this user, in addition to the standard menu.", domain=lambda self: [('id', '!=', self.env.ref('base.action_open_website').id)])
groups_id = fields.Many2many('res.groups', 'res_groups_users_rel', 'uid', 'gid', string='Groups', default=_default_groups)
log_ids = fields.One2many('res.users.log', 'create_uid', string='User log entries')
login_date = fields.Datetime(related='log_ids.create_date', string='Latest connection')